public class DefaultClassLoaderRepository extends ModifiableClassLoaderRepository
Constructor and Description |
---|
DefaultClassLoaderRepository() |
Modifier and Type | Method and Description |
---|---|
protected void |
addClassLoader(java.lang.ClassLoader cl)
Adds, if does not already exist, the specified ClassLoader to this repository.
|
protected java.util.ArrayList |
cloneClassLoaders() |
protected java.util.ArrayList |
getClassLoaders() |
java.lang.Class |
loadClass(java.lang.String className)
Loads the given class iterating through the list of classloaders contained in this repository,
from the first to the last.
|
java.lang.Class |
loadClassBefore(java.lang.ClassLoader loader,
java.lang.String className)
Loads the given class iterating through the list of classloaders contained in this repository,
from the first to the specified ClassLoader (that is not asked to load the class).
|
java.lang.Class |
loadClassWithout(java.lang.ClassLoader loader,
java.lang.String className)
Loads the given class iterating through the list of classloaders contained in this repository,
from the first to the last, excluded the specified ClassLoader.
|
protected void |
removeClassLoader(java.lang.ClassLoader cl)
Removes, if exists, the specified ClassLoader from this repository.
|
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
javax.management.loading.ClassLoaderRepository
className
- The name of the class to loadjava.lang.ClassNotFoundException
- If the class is not foundClassLoaderRepository.loadClassBefore(java.lang.ClassLoader, java.lang.String)
public java.lang.Class loadClassWithout(java.lang.ClassLoader loader, java.lang.String className) throws java.lang.ClassNotFoundException
javax.management.loading.ClassLoaderRepository
loader
- The ClassLoader that should not be asked to load the classclassName
- The name of the class to loadjava.lang.ClassNotFoundException
- If the class is not foundClassLoaderRepository.loadClassBefore(java.lang.ClassLoader, java.lang.String)
public java.lang.Class loadClassBefore(java.lang.ClassLoader loader, java.lang.String className) throws java.lang.ClassNotFoundException
javax.management.loading.ClassLoaderRepository
loader
- The ClassLoader that should not be asked to load the class and where the search must stopclassName
- The name of the class to loadjava.lang.ClassNotFoundException
- If the class is not foundprotected void addClassLoader(java.lang.ClassLoader cl)
ModifiableClassLoaderRepository
addClassLoader
in class ModifiableClassLoaderRepository
cl
- The classloader to addModifiableClassLoaderRepository.removeClassLoader(java.lang.ClassLoader)
protected void removeClassLoader(java.lang.ClassLoader cl)
ModifiableClassLoaderRepository
removeClassLoader
in class ModifiableClassLoaderRepository
cl
- The classloader to removeModifiableClassLoaderRepository.addClassLoader(java.lang.ClassLoader)
protected java.util.ArrayList cloneClassLoaders()
protected java.util.ArrayList getClassLoaders()