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

Quick Search    Search Deep

abbot.util
Class PreloadingClassLoader  view PreloadingClassLoader download PreloadingClassLoader.java

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byabbot.util.PathClassLoader
                  extended byabbot.util.PreloadingClassLoader

public class PreloadingClassLoader
extends PathClassLoader

Provides support for loading a class before checking the parent class loader. If delegation is off, defers to parent only if the class is not found.


Nested Class Summary
 
Nested classes inherited from class abbot.util.PathClassLoader
 
Nested classes inherited from class java.net.URLClassLoader
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
private  boolean delegate
           
 
Fields inherited from class abbot.util.PathClassLoader
 
Fields inherited from class java.net.URLClassLoader
 
Fields inherited from class java.security.SecureClassLoader
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
PreloadingClassLoader(java.lang.String path, boolean delegate, java.lang.ClassLoader parent)
           
 
Method Summary
 java.lang.Class findClass(java.lang.String name)
          Find the given class in the search path.
 java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load the given class, if possible, but don't delegate to any other class loader.
protected  boolean shouldDelegate(java.lang.String name)
           
 
Methods inherited from class abbot.util.PathClassLoader
convertPathToFiles, convertPathToFiles, getClassPath, getURLs
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance, toString
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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, wait, wait, wait
 

Field Detail

delegate

private boolean delegate
Constructor Detail

PreloadingClassLoader

public PreloadingClassLoader(java.lang.String path,
                             boolean delegate,
                             java.lang.ClassLoader parent)
Method Detail

shouldDelegate

protected boolean shouldDelegate(java.lang.String name)

findClass

public java.lang.Class findClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Find the given class in the search path.


loadClass

public java.lang.Class loadClass(java.lang.String name,
                                 boolean resolve)
                          throws java.lang.ClassNotFoundException
Load the given class, if possible, but don't delegate to any other class loader.

Overrides:
loadClass in class PathClassLoader