org.freecompany.brimstone.module
public class DelegatingClassLoader extends URLClassLoader
Field Summary | |
---|---|
protected Notification | notifier |
Constructor Summary | |
---|---|
DelegatingClassLoader()
Creates an delegating class loader with no parent and no
source URLs. | |
DelegatingClassLoader(ClassLoader parent)
Creates an delegating class loader with no source URLs
which uses the provided parent loader. | |
DelegatingClassLoader(URL[] urls)
Creates an delegating class loader with no parent and with the
specified source URLs. | |
DelegatingClassLoader(URL[] urls, ClassLoader parent)
Creates an delegating class loader with the specified source URLs
and which uses the provided parent loader. |
Method Summary | |
---|---|
void | addDelegate(ClassLoader loader)
Adds a class loader to the list of delegates. |
void | addUrl(URL url)
Exposes the ability to add locations to this class loader at runtime. |
protected String | dump()
Dumps a string representation of the current threads local stack.
|
protected Pair<ClassLoader,String> | pop()
Pops the Pair on the top of the stack.
|
protected void | push(Pair<ClassLoader,String> pair)
Pushes a new Pair onto the thread local stack.
|
protected boolean | searching(String name)
Checks to see if the provided name is currently in the process of being
loaded. |
protected static String | shortName(Class clazz)
Strips extra characters from a fully qualified class name, leaving only
the name within the package.
|
protected boolean | skip(ClassLoader child, String name)
Checks the thread local state to determine whether the provided child needs
to be skipped.
|
Parameters: loader the ClassLoader to add to the delegate list.
Parameters: url the url to add to the list of locations searched for class definitions.
Returns: {$link String} representing the current stack state.
Returns: the top of the stack if it is not empty.
Throws: EmptyStackException if there are no entries on the stack.
Parameters: pair the pair of elements describing the latest loading event.
Parameters: name the current class being loaded.
Parameters: clazz the Class for which to construct a short name.
Returns: the class name within its package.
Parameters: child child class loader to test. name the name of the resource being loaded.
Returns: boolean
indicating whether this child should be skipped.