com.caucho.util
Class DynamicClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--com.caucho.util.DynamicClassLoader
- Direct Known Subclasses:
- DirectoryClassLoader, SimpleClassLoader
- public abstract class DynamicClassLoader
- extends java.lang.ClassLoader
Class loader which checks for changes in class files and automatically
picks up new jars.
Field Summary |
protected java.lang.String |
classPath
|
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, 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 |
classPath
protected java.lang.String classPath
DynamicClassLoader
protected DynamicClassLoader()
- Create a new class loader
DynamicClassLoader
protected DynamicClassLoader(java.lang.ClassLoader parent)
- Create a new class loader (jdk1.2)
- Parameters:
parent
- parent class loader
setParent
public void setParent(java.lang.ClassLoader parent)
setNext
public void setNext(DynamicClassLoader next)
getParentLoader
public java.lang.ClassLoader getParentLoader()
getClassPath
public java.lang.String getClassPath()
isModified
public boolean isModified()
- True if any of the loaded classes have been modified. If true, the
caller should drop the classpath and create a new one.
makeAll
public void makeAll()
throws java.lang.Exception
loadClass
public java.lang.Class loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
- Load a class using this class loader
- Overrides:
loadClass
in class java.lang.ClassLoader
findClass
protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
- Load a class using this class loader
- Overrides:
findClass
in class java.lang.ClassLoader
getClassEntry
protected DynamicClassLoader.Entry getClassEntry(java.lang.String name)
throws java.lang.ClassNotFoundException
getResource
public java.net.URL getResource(java.lang.String name)
- Overrides:
getResource
in class java.lang.ClassLoader
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
- Opens a stream to a resource somewhere in the classpath
- Overrides:
getResourceAsStream
in class java.lang.ClassLoader
findLibrary
public java.lang.String findLibrary(java.lang.String name)
- Overrides:
findLibrary
in class java.lang.ClassLoader
getPath
protected Path getPath(java.lang.String name)
fillClassPath
protected java.lang.String fillClassPath()
- Fill data for the class path. fillClassPath() will add all
.jar and .zip files in the directory list.