org.jgap.util
Class MultiClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.jgap.util.MultiClassLoader
-
- Direct Known Subclasses:
- JarClassLoader
public abstract class MultiClassLoader extends java.lang.ClassLoaderA 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.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor and Description MultiClassLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.ClassloadClass(java.lang.String className)This is a simple version for external clients since they will always want the class resolved before it is returned to them.java.lang.ClassloadClass(java.lang.String className, boolean resolveIt)voidsetClassNameReplacementChar(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.
-
-
-
Method Detail
-
loadClass
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundExceptionThis is a simple version for external clients since they will always want the class resolved before it is returned to them.- Overrides:
loadClassin classjava.lang.ClassLoader- Throws:
java.lang.ClassNotFoundException
-
loadClass
public java.lang.Class loadClass(java.lang.String className, boolean resolveIt) throws java.lang.ClassNotFoundException- Overrides:
loadClassin classjava.lang.ClassLoader- Throws:
java.lang.ClassNotFoundException
-
setClassNameReplacementChar
public 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. In the above example the char would be '_'.
-
-
DMelt 3.0 © DataMelt by jWork.ORG