MCPcopy Index your code
hub / github.com/beanshell/beanshell / createClassManager

Method createClassManager

src/bsh/BshClassManager.java:136–158  ·  view source on GitHub ↗

Create a new instance of the class manager. Class manager instnaces are now associated with the interpreter. @see bsh.Interpreter#getClassManager() @see bsh.Interpreter#setClassLoader( ClassLoader )

( Interpreter interpreter )

Source from the content-addressed store, hash-verified

134 @see bsh.Interpreter#setClassLoader( ClassLoader )
135 */
136 public static BshClassManager createClassManager( Interpreter interpreter )
137 {
138 BshClassManager manager;
139
140 // Do we have the optional package?
141 if ( Capabilities.classExists("bsh.classpath.ClassManagerImpl") )
142 try {
143 // Try to load the module
144 // don't refer to it directly here or we're dependent upon it
145 Class clazz = Class.forName( "bsh.classpath.ClassManagerImpl" );
146 manager = (BshClassManager) clazz.newInstance();
147 } catch ( Exception e ) {
148 throw new InterpreterError("Error loading classmanager", e);
149 }
150 else
151 manager = new BshClassManager();
152
153 if ( interpreter == null )
154 interpreter = new Interpreter();
155 manager.declaringInterpreter = interpreter;
156 classManagers.put(manager,null);
157 return manager;
158 }
159
160 public boolean classExists( String name ) {
161 return ( classForName( name ) != null );

Callers 4

getClassManagerMethod · 0.95
pruneMethod · 0.95
InterpreterMethod · 0.95
ClassBrowserMethod · 0.95

Calls 2

classExistsMethod · 0.95
putMethod · 0.65

Tested by

no test coverage detected