Package com.ganteater.ae
Class MultiClassLoader
java.lang.Object
java.lang.ClassLoader
com.ganteater.ae.MultiClassLoader
- Direct Known Subclasses:
JarClassLoader
A simple test class loader capable of loading from multiple sources, such as
local files or a URL.
This class is derived from an article by Chuck McManis
http://www.javaworld.com/javaworld/jw-10-1996/indepth.src.html with large
modifications.
Note that this has been updated to use the non-deprecated version of
defineClass() -- JDM.
- Author:
- Jack Harich - 8/18/97, John D. Mitchell - 99.03.04
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
formatClassName
(String className) Class<?>
This is a simple version for external clients since they will always want the class resolved before it is returned to them.Class<?>
protected abstract byte[]
loadClassBytes
(String className) protected void
protected static void
void
setClassNameReplacementChar
(char replacement) This optional call allows a class name such as "COM.test.Hello" to be changed to "COM_test_Hello", which is useful for storing classes from different packages in the same retrival directory.Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
monitorOn
-
sourceMonitorOn
-
-
Constructor Details
-
MultiClassLoader
public MultiClassLoader()
-
-
Method Details
-
loadClass
This is a simple version for external clients since they will always want the class resolved before it is returned to them.- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
setClassNameReplacementChar
This optional call allows a class name such as "COM.test.Hello" to be changed to "COM_test_Hello", which is useful for storing classes from different packages in the same retrival directory. In the above example the char would be '_'. -
loadClassBytes
-
formatClassName
-
monitor
-
print
-