Interface ClassFactory
-
- All Known Implementing Classes:
DatabaseClasses,ReflectClassesJava2
public interface ClassFactoryA class factory module to handle application classes and generated classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassInspectorgetClassInspector()Return a ClassInspector objectintgetClassLoaderVersion()Return the in-memory "version" of the class manager.booleanisApplicationClass(java.lang.Class theClass)Was the passed in class loaded by a ClassManager.java.lang.ClassloadApplicationClass(java.io.ObjectStreamClass classDescriptor)Load an application class, or a class that is potentially an application class.java.lang.ClassloadApplicationClass(java.lang.String className)Load an application class, or a class that is potentially an application class.GeneratedClassloadGeneratedClass(java.lang.String fullyQualifiedName, ByteArray classDump)Add a generated class to the class manager's class repository.voidnotifyModifyClasspath(java.lang.String classpath)Notify the class manager that the classpath has been modified.voidnotifyModifyJar(boolean reload)Notify the class manager that a jar file has been modified.
-
-
-
Method Detail
-
loadGeneratedClass
GeneratedClass loadGeneratedClass(java.lang.String fullyQualifiedName, ByteArray classDump) throws StandardException
Add a generated class to the class manager's class repository.- Throws:
StandardException- Standard Derby error policy
-
getClassInspector
ClassInspector getClassInspector()
Return a ClassInspector object
-
loadApplicationClass
java.lang.Class loadApplicationClass(java.lang.String className) throws java.lang.ClassNotFoundExceptionLoad an application class, or a class that is potentially an application class.- Throws:
java.lang.ClassNotFoundException- Class cannot be found, or a SecurityException or LinkageException was thrown loading the class.
-
loadApplicationClass
java.lang.Class loadApplicationClass(java.io.ObjectStreamClass classDescriptor) throws java.lang.ClassNotFoundExceptionLoad an application class, or a class that is potentially an application class.- Throws:
java.lang.ClassNotFoundException- Class cannot be found, or a SecurityException or LinkageException was thrown loading the class.
-
isApplicationClass
boolean isApplicationClass(java.lang.Class theClass)
Was the passed in class loaded by a ClassManager.- Returns:
- true if the class was loaded by a Derby class manager, false it is was loaded by the system class loader, or another class loader.
-
notifyModifyJar
void notifyModifyJar(boolean reload) throws StandardExceptionNotify the class manager that a jar file has been modified.- Parameters:
reload- Restart any attached class loader- Throws:
StandardException- thrown on error
-
notifyModifyClasspath
void notifyModifyClasspath(java.lang.String classpath) throws StandardExceptionNotify the class manager that the classpath has been modified.- Throws:
StandardException- thrown on error
-
getClassLoaderVersion
int getClassLoaderVersion()
Return the in-memory "version" of the class manager. The version is bumped everytime the classes are re-loaded.
-
-