| java.lang.Object org.jboss.mx.loading.LoaderRepository org.jboss.mx.loading.BasicLoaderRepository
BasicLoaderRepository | public class BasicLoaderRepository extends LoaderRepository (Code) | | Implements a simple classloader repository for the MBean server. The basic
loader repository uses an unordered list of classloaders to try and load
the required class. There is no attempt made to resolve conflicts between
classes loaded by different classloaders.
A thread's context class loader is always searched first. Context class loader
is not required to be registered to the repository.
See Also: org.jboss.mx.loading.LoaderRepository author: Juha Lindfors. version: $Revision: 57200 $ |
Method Summary | |
public void | addClassLoader(ClassLoader cl) | public boolean | addClassLoaderURL(ClassLoader cl, URL url) | public URL | getResource(String name, ClassLoader cl) | public void | getResources(String name, ClassLoader cl, List urls) | public Class | loadClass(String className) Loads a class from the repository. | public Class | loadClass(String name, boolean resolve, ClassLoader cl) | public Class | loadClassBefore(ClassLoader stop, String className) Loads a class from the repository, using the classloaders that were
registered before the given classloader. | public Class | loadClassWithout(ClassLoader skipLoader, String className) Loads a class from the repository, excluding the given
classloader. | public RepositoryClassLoader | newClassLoader(URL url, boolean addToRepository) | public RepositoryClassLoader | newClassLoader(URL url, URL origURL, boolean addToRepository) | public void | removeClassLoader(ClassLoader cl) |
loadClass | public Class loadClass(String className) throws ClassNotFoundException(Code) | | Loads a class from the repository. This method attempts to load the class
using all the classloader registered to the repository.
Parameters: className - the class to load the found class exception: ClassNotFoundException - when there is no such class |
loadClassBefore | public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException(Code) | | Loads a class from the repository, using the classloaders that were
registered before the given classloader.
Parameters: stop - consult all the classloaders registered before this onein an attempt to load a class Parameters: className - name of the class to load loaded class instance throws: ClassNotFoundException - if none of the consulted classloaders wereable to load the requested class |
loadClassWithout | public Class loadClassWithout(ClassLoader skipLoader, String className) throws ClassNotFoundException(Code) | | Loads a class from the repository, excluding the given
classloader.
Parameters: skipLoader - the classloader to exclude Parameters: className - the class to load the found class exception: ClassNotFoundException - when there is no such class |
Methods inherited from org.jboss.mx.loading.LoaderRepository | abstract public void addClassLoader(ClassLoader cl)(Code)(Java Doc) abstract public boolean addClassLoaderURL(ClassLoader cl, URL url)(Code)(Java Doc) void cacheLoadedClass(String name, Class cls, ClassLoader cl)(Code)(Java Doc) void clear()(Code)(Java Doc) public int compare(LoaderRepository lr)(Code)(Java Doc) public Class getCachedClass(String classname)(Code)(Java Doc) public Vector getLoaders()(Code)(Java Doc) final public static Class getNativeClassForName(String className)(Code)(Java Doc) abstract public URL getResource(String name, ClassLoader cl)(Code)(Java Doc) abstract public void getResources(String name, ClassLoader cl, List urls)(Code)(Java Doc) public Translator getTranslator()(Code)(Java Doc) public URL[] getURLs()(Code)(Java Doc) abstract public Class loadClass(String className) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClass(String name, boolean resolve, ClassLoader cl) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException(Code)(Java Doc) abstract public RepositoryClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception(Code)(Java Doc) abstract public RepositoryClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception(Code)(Java Doc) abstract public void removeClassLoader(ClassLoader cl)(Code)(Java Doc) protected int reverseCompare(LoaderRepository lr)(Code)(Java Doc) public void setTranslator(Translator t)(Code)(Java Doc)
|
|
|