com.pegacat.vcf.utility
Class PluginClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--com.pegacat.vcf.utility.PluginClassLoader

public class PluginClassLoader
extends java.lang.ClassLoader

Title: test Description: See if we can get this crappy IDE to work properly just once. Copyright: Copyright (c) 2001 Company:


Field Summary
protected  java.util.Hashtable classes
          a cached list of classes to speed the return of twice loaded classes.
static boolean debug
           
protected  java.util.Hashtable lowerCaseClasses
           
protected  PluginResource resourceLoader
          The resource loader provides the interface to a group of zip files.
 
Constructor Summary
PluginClassLoader(PluginResource loader)
          Constructor - note that that the class is useless until at least one resource file has been registered with it using the addResource() method.
 
Method Summary
 java.lang.Class findClass(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.Class findClass(java.lang.String className, boolean resolveIt)
          This is the required version of findClass which is called both from findClass above and from the internal function loadClass of the parent.
protected  java.net.URL findResource(java.lang.String name)
          Returns a 'jar url' to the specified resource.
 java.lang.String toString()
           
protected  java.lang.String translateClassName(java.lang.String name)
          Translates the '.' seperators of Class package names into the \ seperators needed for the internal directory structure of the zip file.
 
Methods inherited from class java.lang.ClassLoader
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static boolean debug

classes

protected java.util.Hashtable classes
a cached list of classes to speed the return of twice loaded classes.

lowerCaseClasses

protected java.util.Hashtable lowerCaseClasses

resourceLoader

protected PluginResource resourceLoader
The resource loader provides the interface to a group of zip files.
Constructor Detail

PluginClassLoader

public PluginClassLoader(PluginResource loader)
Constructor - note that that the class is useless until at least one resource file has been registered with it using the addResource() method.
Method Detail

translateClassName

protected java.lang.String translateClassName(java.lang.String name)
Translates the '.' seperators of Class package names into the \ seperators needed for the internal directory structure of the zip file.

findClass

public java.lang.Class findClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException
This is a simple version for external clients since they will always want the class resolved before it is returned to them.
Overrides:
findClass in class java.lang.ClassLoader

findClass

public java.lang.Class findClass(java.lang.String className,
                                 boolean resolveIt)
                          throws java.lang.ClassNotFoundException
This is the required version of findClass which is called both from findClass above and from the internal function loadClass of the parent.

findResource

protected java.net.URL findResource(java.lang.String name)
Returns a 'jar url' to the specified resource.
Overrides:
findResource in class java.lang.ClassLoader
Parameters:
name - the name of the resource to look for (e.g. 'HelpSet.hs')
Returns:
the url of the resource, (e.g. 'jar:file:myjarfile.jar!/HelpSet.hs'. - this will be null if the resource cannot be found in the known jar file.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object