Method Summary |
|
public void | addClassPath(URL path) |
public void | addListener(Listener l) |
public void | associateClass(Class clas) Associate a persistent generated class implementation with this
interpreter. |
public void | cacheClassInfo(String name, Class value) Cache info about whether name is a class or not. |
public void | cacheResolvedMethod(Class clas, Class[] types, Method method) Cache a resolved (possibly overloaded) method based on the
argument types used to invoke it, subject to classloader change. |
public boolean | classExists(String name) |
public Class | classForName(String name) Load the specified class by name, taking into account added classpath
and reloaded classes, etc.
Note: Again, this is just a trivial implementation. |
protected void | classLoaderChanged() |
protected void | clearCaches() |
protected static UtilEvalError | cmUnavailable() |
public static BshClassManager | createClassManager(Interpreter interpreter) Create a new instance of the class manager. |
public Class | defineClass(String name, byte[] code) |
protected void | definingClass(String className) Flag the class name as being in the process of being defined. |
protected void | doSuperImport() Support for "import *;"
Hide details in here as opposed to NameSpace. |
protected void | doneDefiningClass(String className) Indicate that the specified class name has been defined and may be
loaded normally. |
public void | dump(PrintWriter pw) |
public Class | getAssociatedClass(String name) |
protected String | getClassBeingDefined(String className) This method is a temporary workaround used with definingClass. |
protected String | getClassNameByUnqName(String name) Return the name or null if none is found,
Throw an ClassPathException containing detail if name is ambigous. |
protected Method | getResolvedMethod(Class clas, String methodName, Class[] types, boolean onlyStatic) Return a previously cached resolved method.
Parameters: onlyStatic - specifies that only a static method may be returned. |
public URL | getResource(String path) |
public InputStream | getResourceAsStream(String path) |
protected boolean | hasSuperImport() A "super import" ("import *") operation has been performed. |
protected boolean | isClassBeingDefined(String className) |
protected Class | loadSourceClass(String name) |
protected static Error | noClassDefFound(String className, Error e) Annotate the NoClassDefFoundError with some info about the class
we were trying to load. |
public Class | plainClassForName(String name) Perform a plain Class.forName() or call the externally provided
classloader. |
public void | reloadAllClasses() Overlay the entire path with a new class loader. |
public void | reloadClasses(String[] classNames) Reloading classes means creating a new classloader and using it
whenever we are asked for classes in the appropriate space. |
public void | reloadPackage(String pack) Reload all classes in the specified package: e.g. |
public void | removeListener(Listener l) |
public void | reset() Clear all loaders and start over. |
public void | setClassLoader(ClassLoader externalCL) Set an external class loader. |
public void | setClassPath(URL[] cp) Set a new base classpath and create a new base classloader.
This means all types change. |