public class NamedClassLoader extends java.net.URLClassLoader implements DestroyableClassLoader
| Constructor and Description |
|---|
NamedClassLoader(java.lang.String name,
java.net.URL[] urls)
Creates a named class loader with no parents.
|
NamedClassLoader(java.lang.String name,
java.net.URL[] urls,
java.lang.ClassLoader parent)
Creates a named class loader as a child of the specified parent.
|
NamedClassLoader(java.lang.String name,
java.net.URL[] urls,
java.lang.ClassLoader parent,
java.net.URLStreamHandlerFactory factory)
Creates a named class loader as a child of the specified parent and using the specified URLStreamHandlerFactory
for accessing the urls..
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the clasloader releasing all resources.
|
java.lang.String |
getName()
Gets the name of this class loader.
|
boolean |
isDestroyed()
Check if this classloader has been destroyed
|
java.lang.String |
toString() |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic NamedClassLoader(java.lang.String name, java.net.URL[] urls)
name - the name of this class loaderurls - the urls from which this class loader will classes and resourcespublic NamedClassLoader(java.lang.String name, java.net.URL[] urls, java.lang.ClassLoader parent)
name - the name of this class loaderurls - the urls from which this class loader will classes and resourcesparent - the parent of this class loaderpublic NamedClassLoader(java.lang.String name, java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory)
name - the name of this class loaderurls - the urls from which this class loader will classes and resourcesparent - the parent of this class loaderfactory - the URLStreamHandlerFactory used to access the urlspublic boolean isDestroyed()
public void destroy()
destroy in interface DestroyableClassLoaderpublic java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2012. All Rights Reserved.