public class AggregateClassLoader
extends java.lang.ClassLoader
similar to XStream's CompositeClassLoader, but also supporting resources, exposing more info, a few conveniences, and a nice toString
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.ClassLoader classLoader)
Add a loader to the specific position in the search path.
|
void |
addFirst(java.lang.ClassLoader classLoader)
Add a loader to the first position in the search path.
|
void |
addLast(java.lang.ClassLoader classLoader)
Add a loader to the last position in the search path.
|
java.util.List<java.lang.ClassLoader> |
getList()
Deprecated.
since 0.7.0
|
java.net.URL |
getResource(java.lang.String name) |
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name) |
boolean |
isEmpty()
True if nothing is in the list here
|
java.util.Iterator<java.lang.ClassLoader> |
iterator() |
static AggregateClassLoader |
newInstanceWithDefaultLoaders()
creates default instance, with classloaders of Object and AggregateClassLoader
|
static AggregateClassLoader |
newInstanceWithNoLoaders()
creates default instance, with no classloaders (assuming this instance will itself be nested,
or defaults will be added by caller)
|
void |
reset(java.util.Collection<? extends java.lang.ClassLoader> newClassLoaders)
Resets the classloader shown here to be the given set
|
java.lang.String |
toString() |
public static AggregateClassLoader newInstanceWithDefaultLoaders()
public static AggregateClassLoader newInstanceWithNoLoaders()
public void addFirst(java.lang.ClassLoader classLoader)
public void addLast(java.lang.ClassLoader classLoader)
public void add(int index, java.lang.ClassLoader classLoader)
public void reset(java.util.Collection<? extends java.lang.ClassLoader> newClassLoaders)
public boolean isEmpty()
@Deprecated public java.util.List<java.lang.ClassLoader> getList()
public java.util.Iterator<java.lang.ClassLoader> iterator()
public java.lang.String toString()
toString
in class java.lang.Object
public java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
getResources
in class java.lang.ClassLoader
java.io.IOException