Interface ClassFactory
- All Known Implementing Classes:
DatabaseClasses
,ReflectClassesJava2
public interface ClassFactory
A class factory module to handle application classes
and generated classes.
-
Method Summary
Modifier and TypeMethodDescriptionReturn a ClassInspector objectint
Return the in-memory "version" of the class manager.boolean
isApplicationClass
(Class theClass) Was the passed in class loaded by a ClassManager.loadApplicationClass
(ObjectStreamClass classDescriptor) Load an application class, or a class that is potentially an application class.loadApplicationClass
(String className) Load an application class, or a class that is potentially an application class.loadGeneratedClass
(String fullyQualifiedName, ByteArray classDump) Add a generated class to the class manager's class repository.void
notifyModifyClasspath
(String classpath) Notify the class manager that the classpath has been modified.void
notifyModifyJar
(boolean reload) Notify the class manager that a jar file has been modified.
-
Method Details
-
loadGeneratedClass
GeneratedClass loadGeneratedClass(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
Load an application class, or a class that is potentially an application class.- Throws:
ClassNotFoundException
- Class cannot be found, or a SecurityException or LinkageException was thrown loading the class.
-
loadApplicationClass
Load an application class, or a class that is potentially an application class.- Throws:
ClassNotFoundException
- Class cannot be found, or a SecurityException or LinkageException was thrown loading the class.
-
isApplicationClass
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
Notify the class manager that a jar file has been modified.- Parameters:
reload
- Restart any attached class loader- Throws:
StandardException
- thrown on error
-
notifyModifyClasspath
Notify 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.
-