Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.util
Class ZipClassLoader  view ZipClassLoader download ZipClassLoader.java

java.lang.Object
  extended byjava.lang.ClassLoader
      extended bycom.trapezium.util.ZipClassLoader

public class ZipClassLoader
extends java.lang.ClassLoader

This subclass of ClassLoader can load classes from a zip file.


Nested Class Summary
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
private static char altSep
           
(package private) static java.util.Hashtable cache
           
private static char favoredSep
           
(package private)  java.util.zip.ZipFile zipFile
           
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
ZipClassLoader(java.util.zip.ZipFile zf)
           
 
Method Summary
static java.lang.Class classForName(java.lang.String name)
           
private  java.util.zip.ZipEntry findClassEntry(java.lang.String name)
           
protected  java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load a class using this ClassLoader or its parent, possibly resolving it as well using resolveClass().
 java.lang.Class loadClass(java.util.zip.ZipEntry ze)
           
private static byte[] loadClassData(java.io.InputStream is, int size)
           
private  byte[] loadClassData(java.util.zip.ZipEntry entry)
           
static java.lang.String massageClassToFile(java.lang.String name)
           
 
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
 

Field Detail

favoredSep

private static char favoredSep

altSep

private static char altSep

zipFile

java.util.zip.ZipFile zipFile

cache

static java.util.Hashtable cache
Constructor Detail

ZipClassLoader

public ZipClassLoader(java.util.zip.ZipFile zf)
Method Detail

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.