javax.management.loading
Interface ClassLoaderRepository

All Known Implementing Classes:
LoaderRepository (src)

public interface ClassLoaderRepository

A classloader repository.

A loader repository per MBeanServer.


Method Summary
 java.lang.Class loadClass(java.lang.String className)
          Loads a class from the repository.
 java.lang.Class loadClassBefore(java.lang.ClassLoader stop, java.lang.String className)
          Loads a class from the repository, using the classloaders that were registered before the given classloader.
 java.lang.Class loadClassWithout(java.lang.ClassLoader loader, java.lang.String className)
          Loads a class from the repository, excluding the given classloader.
 

Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException
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
Returns:
the found class
Throws:
java.lang.ClassNotFoundException - when there is no such class

loadClassWithout

public java.lang.Class loadClassWithout(java.lang.ClassLoader loader,
                                        java.lang.String className)
                                 throws java.lang.ClassNotFoundException
Loads a class from the repository, excluding the given classloader.

Parameters:
loader - the classloader to exclude
className - the class to load
Returns:
the found class
Throws:
java.lang.ClassNotFoundException - when there is no such class

loadClassBefore

public java.lang.Class loadClassBefore(java.lang.ClassLoader stop,
                                       java.lang.String className)
                                throws java.lang.ClassNotFoundException
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 one in an attempt to load a class
className - name of the class to load
Returns:
loaded class instance
Throws:
java.lang.ClassNotFoundException - if none of the consulted classloaders were able to load the requested class