|
||||||||||
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.axis2.classloader.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(java.net.URL[] urls)
Creates a named class loader with no parents. |
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
Creates a named class loader as a child of the specified parent. |
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader[] parents)
Creates a named class loader as a child of the specified parents. |
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader[] parents,
boolean inverseClassLoading,
java.util.Collection hiddenClasses,
java.util.Collection nonOverridableClasses)
|
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader[] parents,
boolean inverseClassLoading,
java.lang.String[] hiddenClasses,
java.lang.String[] nonOverridableClasses)
|
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader[] parents,
java.net.URLStreamHandlerFactory factory)
Creates a named class loader as a child of the specified parents and using the specified URLStreamHandlerFactory for accessing the urls.. |
|
MultiParentClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent,
boolean inverseClassLoading,
java.lang.String[] hiddenClasses,
java.lang.String[] nonOverridableClasses)
|
|
MultiParentClassLoader(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.. |
Method Summary | |
---|---|
void |
addURL(java.net.URL url)
|
void |
destroy()
|
java.util.Enumeration |
findResources(java.lang.String name)
|
java.lang.ClassLoader[] |
getParents()
Gets the parents of this class loader. |
java.net.URL |
getResource(java.lang.String name)
|
boolean |
isDestroyed()
|
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
|
java.lang.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.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiParentClassLoader(java.net.URL[] urls)
urls
- the urls from which this class loader will classes and resourcespublic MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
urls
- the urls from which this class loader will classes and resourcesparent
- the parent of this class loaderpublic MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, boolean inverseClassLoading, java.lang.String[] hiddenClasses, java.lang.String[] nonOverridableClasses)
public MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory)
urls
- 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(java.net.URL[] urls, java.lang.ClassLoader[] parents)
urls
- the urls from which this class loader will classes and resourcesparents
- the parents of this class loaderpublic MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents, boolean inverseClassLoading, java.util.Collection hiddenClasses, java.util.Collection nonOverridableClasses)
public MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents, boolean inverseClassLoading, java.lang.String[] hiddenClasses, java.lang.String[] nonOverridableClasses)
public MultiParentClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents, java.net.URLStreamHandlerFactory factory)
urls
- 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 java.lang.ClassLoader[] getParents()
public void addURL(java.net.URL url)
addURL
in class java.net.URLClassLoader
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
public java.util.Enumeration findResources(java.lang.String name) throws java.io.IOException
findResources
in class java.net.URLClassLoader
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isDestroyed()
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |