public class ReplacementClassLoader extends ClassLoader
Modifier and Type | Field and Description |
---|---|
private Hashtable |
classes |
private Class |
clazz |
static String |
codebase
The path (relative to the anchor) relative to which classes will be
loaded.
|
private Hashtable |
replacements |
Constructor and Description |
---|
ReplacementClassLoader(String[] replacementList,
Class clazz)
Construct a new
ReplacementClassLoader . |
Modifier and Type | Method and Description |
---|---|
protected Class |
loadClass(String name,
boolean resolve)
Load a class.
|
private String |
translateName(String name) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public static final String codebase
private Hashtable replacements
public ReplacementClassLoader(String[] replacementList, Class clazz)
ReplacementClassLoader
. The class loader
will become active once a class is loaded explicitly via its
loadClass()
method. All classes loaded by that class will,
in turn, be loaded by this class loader.replacementList
- A list of full-qualified names of classes that
will be loaded from a local source.clazz
- The class relative to which the patches resource
directory is located. This resource directory contains the class
hierarchy of replacement classes.protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
name
- The fully-qualified name of the class to load.resolve
- A flag specifying whether the class should be resolved.ClassNotFoundException
- If the named class could not
be found.private String translateName(String name)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses