kiwi.util
Class ReplacementClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--kiwi.util.ReplacementClassLoader
- public class ReplacementClassLoader
- extends ClassLoader
A custom class loader that can be used to selectively replace core classes.
- Version:
- 1.0 (05/98)
- Author:
- Mark Lindner, PING Software Grou
Field Summary |
static String |
codebase
The path (relative to the anchor) relative to which classes will be
loaded. |
Methods inherited from class java.lang.ClassLoader |
defineClass,
defineClass,
defineClass,
definePackage,
findClass,
findLibrary,
findLoadedClass,
findResource,
findResources,
findSystemClass,
getPackage,
getPackages,
getParent,
getResource,
getResourceAsStream,
getResources,
getSystemClassLoader,
getSystemResource,
getSystemResourceAsStream,
getSystemResources,
loadClass,
resolveClass,
setSigners |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
codebase
public static final String codebase
- The path (relative to the anchor) relative to which classes will be
loaded.
ReplacementClassLoader
public ReplacementClassLoader(String[] replacementList,
Class clazz)
- Construct a new
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.
- Parameters:
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.
loadClass
protected Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- Load a class.
- Parameters:
name
- The fully-qualified name of the class to load.resolve
- A flag specifying whether the class should be resolved.- Throws:
- ClassNotFoundException - If the named class could not
be found.
- Overrides:
- loadClass in class ClassLoader