|
|||||||||
| 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 URLs. |
|
InvertedClassLoader(java.lang.ClassLoader parent)
Creates an inverted class loader with no source URLs
which uses the provided parent loader. |
|
InvertedClassLoader(java.net.URL[] urls)
Creates an inverted class loader with no parent and with the specified source URLs. |
|
InvertedClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
Creates an inverted class loader with the specified source URLs
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 URLs 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()
URLs.
public InvertedClassLoader(java.lang.ClassLoader parent)
URLs
which uses the provided parent loader.
public InvertedClassLoader(java.net.URL[] urls)
URLs.
public InvertedClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
URLs
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 URLs 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.ClassLoaderjava.lang.ClassNotFoundExceptionpublic 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.ClassLoaderjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||