javax.management.loading
Interface ClassLoaderRepository

All Known Implementing Classes:
BaseClassLoaderRepository

public interface ClassLoaderRepository

Instances of this interface are used to keep the list of Class Loaders registered in a MBean Server. They provide the necessary methods to load classes using the registered Class Loaders.


Method Summary
 java.lang.Class loadClass(java.lang.String className)
           Go through the list of class loaders and try to load the requested class.
 java.lang.Class loadClassWithout(java.lang.ClassLoader loader, java.lang.String className)
           Try to load the class with the list of classloaders without using the given classLoader.
 

Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException

Go through the list of class loaders and try to load the requested class. The method will stop as soon as the class is found, if it is not found a ClassNotFoundException will be thrown

Parameters:
className - - the string represented name of the class to be loaded.
Returns:
the found class
Throws:
java.lang.ClassNotFoundException - - if the class was not found
See Also:
MBeanServerFactory.getClassLoaderRepository(javax.management.MBeanServer)

loadClassWithout

public java.lang.Class loadClassWithout(java.lang.ClassLoader loader,
                                        java.lang.String className)
                                 throws java.lang.ClassNotFoundException

Try to load the class with the list of classloaders without using the given classLoader. The method will stop as soon as the class is found, will throw a ClassNotFoundException if the class is not found

Parameters:
loader - - the ClassLoader to exclude from the list of classLoaders used to load the class
Returns:
- the found class
Throws:
java.lang.ClassNotFoundException - - if the class was not found.


Copyright © 2001-2002 MX4J Team. All Rights Reserved.