org.jboss.mx.loading
Class LoaderRepositoryClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byorg.jboss.util.loading.DelegatingClassLoader (src) 
                  extended byorg.jboss.mx.loading.LoaderRepositoryClassLoader
Direct Known Subclasses:
WebClassLoader (src)

public class LoaderRepositoryClassLoader
extends DelegatingClassLoader (src)

A delegating classloader that first peeks in the loader repository's cache.


Field Summary
protected  LoaderRepository (src) repository
          The loader repository
 
Fields inherited from class org.jboss.util.loading.DelegatingClassLoader (src)
EMPTY_URL_ARRAY, standard
 
Constructor Summary
LoaderRepositoryClassLoader(java.lang.ClassLoader parent, LoaderRepository (src)  repository)
          Constructor
LoaderRepositoryClassLoader(java.lang.ClassLoader parent, LoaderRepository (src)  repository, java.net.URLStreamHandlerFactory factory)
          Constructor
 
Method Summary
protected  java.lang.Class loadClass(java.lang.String className, boolean resolve)
          Load a class, first peek in the loader repository cache then ask the parent.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, 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, toString, wait, wait, wait
 

Field Detail

repository

protected LoaderRepository (src)  repository
The loader repository

Constructor Detail

LoaderRepositoryClassLoader

public LoaderRepositoryClassLoader(java.lang.ClassLoader parent,
                                   LoaderRepository (src)  repository)
Constructor

Parameters:
parent - the parent classloader, cannot be null.
repository - the loader repository, cannot be null.

LoaderRepositoryClassLoader

public LoaderRepositoryClassLoader(java.lang.ClassLoader parent,
                                   LoaderRepository (src)  repository,
                                   java.net.URLStreamHandlerFactory factory)
Constructor

Parameters:
factory - the url stream factory.
Method Detail

loadClass

protected java.lang.Class loadClass(java.lang.String className,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Load a class, first peek in the loader repository cache then ask the parent.

Overrides:
loadClass in class DelegatingClassLoader (src)
Parameters:
className - the class name to load
resolve - whether to link the class
Returns:
the loaded class
Throws:
java.lang.ClassNotFoundException - when the class could not be found