java.lang.Object
java.lang.ClassLoader
com.trapezium.util.ZipClassLoader
- public class ZipClassLoader
- extends java.lang.ClassLoader
This subclass of ClassLoader can load classes from a zip file.
| Nested classes inherited from class java.lang.ClassLoader |
|
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
favoredSep
private static char favoredSep
altSep
private static char altSep
zipFile
java.util.zip.ZipFile zipFile
cache
static java.util.Hashtable cache
ZipClassLoader
public ZipClassLoader(java.util.zip.ZipFile zf)
classForName
public static java.lang.Class classForName(java.lang.String name)
throws java.lang.ClassNotFoundException
massageClassToFile
public static java.lang.String massageClassToFile(java.lang.String name)
findClassEntry
private java.util.zip.ZipEntry findClassEntry(java.lang.String name)
loadClassData
private byte[] loadClassData(java.util.zip.ZipEntry entry)
loadClassData
private static byte[] loadClassData(java.io.InputStream is,
int size)
loadClass
public java.lang.Class loadClass(java.util.zip.ZipEntry ze)
throws java.lang.ClassNotFoundException
loadClass
protected java.lang.Class loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
- Description copied from class:
java.lang.ClassLoader
- Load a class using this ClassLoader or its parent, possibly resolving
it as well using
resolveClass(). It first tries to find
out if the class has already been loaded through this classloader by
calling findLoadedClass(). Then it calls
loadClass() on the parent classloader (or when there is
no parent it uses the VM bootclassloader). If the class is still
not loaded it tries to create a new class by calling
findClass(). Finally when resolve is
true it also calls resolveClass() on the
newly loaded class.
Subclasses should not override this method but should override
findClass() which is called by this method.