javax.management.loading
Class DefaultLoaderRepositoryjava.lang.Object | +--javax.management.loading.DefaultLoaderRepository
- public class DefaultLoaderRepository
- extends java.lang.Object
- implements java.io.Serializable
Keeps the list of Class Loaders registered in the MBean Server. It provides the necessary methods to load classes using the registered Class Loaders.
- Version:
- 1.10
- Author:
- Roberto Longobardi, Raimondo Castino
- See Also:
- Serialized Form
Field Summary protected static java.util.Vector loaders
List of class loaders.
Constructor Summary
DefaultLoaderRepository()
Public constructor.
Method Summary
static java.lang.Class loadClass(java.lang.String className)
Go through the list of all class loaders registered in any MBeanServer on the current VM and try to load the requested class.static java.lang.Class loadClassWithout(java.lang.ClassLoader loader, java.lang.String className)
Go through the list of all class loaders (except the one passed in as the first parameter) registered in any MBeanServer on the current VM and try to load the requested class.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
loaders
protected static java.util.Vector loaders
- List of class loaders. To modify values in this list use the methods defined in
DefaultLoaderRepositorySupport
class. Do not try to modify it directly if you do not want to run the risk to put the repository in an unconsistent state.
Constructor Detail
DefaultLoaderRepository
public DefaultLoaderRepository()
- Public constructor.
Method Detail
loadClass
public static java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
- Go through the list of all class loaders registered in any MBeanServer on the current VM and try to load the requested class.
Parameters:
- className - The name of the class to be loaded.
Throws:
- java.lang.ClassNotFoundException - The specified class could not be found.
loadClassWithout
public static java.lang.Class loadClassWithout(java.lang.ClassLoader loader, java.lang.String className) throws java.lang.ClassNotFoundException
- Go through the list of all class loaders (except the one passed in as the first parameter) registered in any MBeanServer on the current VM and try to load the requested class.
Parameters:
- loader - The class loader to be excluded.
- className - The name of the class to be loaded.
Throws:
- java.lang.ClassNotFoundException - The specified class could not be found.