|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.freecompany.brimstone.module.InvertedClassLoader
public class InvertedClassLoader
Inverts the basic class loader delegation model to allow the same resource to exist in multiple locations within a single tree of class loaders.
Constructor Summary | |
---|---|
InvertedClassLoader()
Creates an inverted class loader with no parent and no source URL s. |
|
InvertedClassLoader(java.lang.ClassLoader parent)
Creates an inverted class loader with no source URL s
which uses the provided parent loader. |
|
InvertedClassLoader(java.net.URL[] urls)
Creates an inverted class loader with no parent and with the specified source URL s. |
|
InvertedClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
Creates an inverted class loader with the specified source URL s
and which uses the provided parent loader. |
Method Summary | |
---|---|
void |
addURL(java.net.URL url)
In this class loader the standard URLClassLoader.addURL(java.net.URL) method
is promoted to allow modifying the list of URL s at runtime. |
java.net.URL |
getResource(java.lang.String name)
Reverses the ordering of the normal ClassLoader.getResource(java.lang.String) method to
first search this loader and to delegate only if the resource is
not found. |
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
Reverses the ordering of the normal ClassLoader.getResources(java.lang.String) method to
first search this loader and to delegate only if no resource can be found. |
java.lang.Class<?> |
loadClass(java.lang.String name)
Reverses the ordering of the normal ClassLoader.loadClass(java.lang.String) method to
first search this loader and to delegate only if the class is
not found. |
Methods inherited from class java.net.URLClassLoader |
---|
definePackage, findClass, findResource, findResources, 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, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvertedClassLoader()
URL
s.
public InvertedClassLoader(java.lang.ClassLoader parent)
URL
s
which uses the provided parent loader.
public InvertedClassLoader(java.net.URL[] urls)
URL
s.
public InvertedClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
URL
s
and which uses the provided parent loader.
Method Detail |
---|
public void addURL(java.net.URL url)
URLClassLoader.addURL(java.net.URL)
method
is promoted to allow modifying the list of URL
s at runtime.
addURL
in class java.net.URLClassLoader
public java.lang.Class<?> loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
ClassLoader.loadClass(java.lang.String)
method to
first search this loader and to delegate only if the class is
not found. This loader is aware of the DelegatingClassLoader
and
will interact with it appropriately to eliminate class loading loops.
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public java.net.URL getResource(java.lang.String name)
ClassLoader.getResource(java.lang.String)
method to
first search this loader and to delegate only if the resource is
not found. This loader is aware of the DelegatingClassLoader
and
will interact with it appropriately to eliminate class loading loops.
getResource
in class java.lang.ClassLoader
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
ClassLoader.getResources(java.lang.String)
method to
first search this loader and to delegate only if no resource can be found. This
loader is aware of the DelegatingClassLoader
and will interact with it
appropriately to eliminate class loading loops.
getResources
in class java.lang.ClassLoader
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |