javax.management.loading
Class DefaultLoaderRepository

java.lang.Object
  extended byjavax.management.loading.DefaultLoaderRepository

public class DefaultLoaderRepository
extends java.lang.Object

A Singleton class which keeps the list of ClassLoaders registered in the MBeanServer. It provides methods to load classes using the registered classLoaders


Method Summary
static java.lang.Class loadClass(java.lang.String className)
           Go through the list of class loaders and try to load the requested class.
static 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadClass

public static 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 static 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.