public class NamedClassLoader extends URLClassLoader implements DestroyableClassLoader
Constructor and Description |
---|
NamedClassLoader(String name,
URL[] urls)
Creates a named class loader with no parents.
|
NamedClassLoader(String name,
URL[] urls,
ClassLoader parent)
Creates a named class loader as a child of the specified parent.
|
NamedClassLoader(String name,
URL[] urls,
ClassLoader parent,
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.
|
String |
getName()
Gets the name of this class loader.
|
boolean |
isDestroyed()
Check if this classloader has been destroyed
|
String |
toString() |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, 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, setSigners
public NamedClassLoader(String name, URL[] urls)
name
- the name of this class loaderurls
- the urls from which this class loader will classes and resourcespublic NamedClassLoader(String name, URL[] urls, 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(String name, URL[] urls, ClassLoader parent, 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 DestroyableClassLoader
public String getName()
Copyright © 2005–2015. All rights reserved.