|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader org.apache.geronimo.kernel.config.MultiParentClassLoader
public class MultiParentClassLoader
A MultiParentClassLoader is a simple extension of the URLClassLoader that simply changes the single parent class loader model to support a list of parent class loaders. Each operation that accesses a parent, has been replaced with a operation that checks each parent in order. This getParent method of this class will always return null, which may be interpreted by the calling code to mean that this class loader is a direct child of the system class loader.
Constructor Summary | |
---|---|
MultiParentClassLoader(Artifact id,
URL[] urls)
Creates a named class loader with no parents. |
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader parent)
Creates a named class loader as a child of the specified parent. |
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader[] parents)
Creates a named class loader as a child of the specified parents. |
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader[] parents,
boolean inverseClassLoading,
Collection hiddenClasses,
Collection nonOverridableClasses)
|
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader[] parents,
boolean inverseClassLoading,
String[] hiddenClasses,
String[] nonOverridableClasses)
|
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader[] parents,
URLStreamHandlerFactory factory)
Creates a named class loader as a child of the specified parents and using the specified URLStreamHandlerFactory for accessing the urls.. |
|
MultiParentClassLoader(Artifact id,
URL[] urls,
ClassLoader parent,
boolean inverseClassLoading,
String[] hiddenClasses,
String[] nonOverridableClasses)
|
|
MultiParentClassLoader(Artifact id,
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.. |
|
MultiParentClassLoader(MultiParentClassLoader source)
|
Method Summary | |
---|---|
void |
addURL(URL url)
|
void |
destroy()
|
Enumeration |
findResources(String name)
|
Artifact |
getId()
Gets the id of this class loader. |
ClassLoader[] |
getParents()
Gets the parents of this class loader. |
URL |
getResource(String name)
|
boolean |
isDestroyed()
|
protected Class |
loadClass(String name,
boolean resolve)
|
String |
toString()
|
Methods inherited from class java.net.URLClassLoader |
---|
definePackage, findClass, findResource, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
---|
defineClass, defineClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiParentClassLoader(Artifact id, URL[] urls)
id
- the id of this class loaderurls
- the urls from which this class loader will classes and resourcespublic MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader parent)
id
- the id of this class loaderurls
- the urls from which this class loader will classes and resourcesparent
- the parent of this class loaderpublic MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader parent, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)
public MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
id
- the id 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 MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents)
id
- the id of this class loaderurls
- the urls from which this class loader will classes and resourcesparents
- the parents of this class loaderpublic MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, Collection hiddenClasses, Collection nonOverridableClasses)
public MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)
public MultiParentClassLoader(MultiParentClassLoader source)
public MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents, URLStreamHandlerFactory factory)
id
- the id of this class loaderurls
- the urls from which this class loader will classes and resourcesparents
- the parents of this class loaderfactory
- the URLStreamHandlerFactory used to access the urlsMethod Detail |
---|
public Artifact getId()
public ClassLoader[] getParents()
public void addURL(URL url)
addURL
in class URLClassLoader
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public URL getResource(String name)
getResource
in class ClassLoader
public Enumeration findResources(String name) throws IOException
findResources
in class URLClassLoader
IOException
public String toString()
toString
in class Object
public boolean isDestroyed()
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |