|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader org.apache.openjpa.lib.util.MultiClassLoader
public class MultiClassLoader
Class loader type that can be configured to delegate to multiple
internal class loaders.
The THREAD_LOADER
constant is a marker that will be replaced
with the context loader of the current thread.
Field Summary | |
---|---|
static ClassLoader |
SYSTEM_LOADER
The standard system class loader. |
static ClassLoader |
THREAD_LOADER
Marker that will be replaced with the context loader of the current thread whenever it is discovered in the class loader list. |
Constructor Summary | |
---|---|
MultiClassLoader()
Constructor; initializes the loader with an empty list of delegates. |
|
MultiClassLoader(MultiClassLoader other)
Construct with the class loaders of another multi loader. |
Method Summary | |
---|---|
boolean |
addClassLoader(ClassLoader loader)
Add the given class loader to the set of loaders that will be tried. |
boolean |
addClassLoader(int index,
ClassLoader loader)
Add the given class loader at the specified index. |
boolean |
addClassLoaders(int index,
MultiClassLoader multi)
Adds all class loaders from the given multi loader starting at the given index. |
boolean |
addClassLoaders(MultiClassLoader multi)
Adds all the class loaders from the given multi loader. |
void |
clear()
Clear the list of class loaders. |
boolean |
containsClassLoader(ClassLoader loader)
Returns true if the list contains the given class loader or marker. |
boolean |
equals(Object other)
|
protected Class |
findClass(String name)
|
protected URL |
findResource(String name)
|
protected Enumeration |
findResources(String name)
|
ClassLoader |
getClassLoader(int index)
Return the class loader at the given index. |
ClassLoader[] |
getClassLoaders()
Return an array of all contained class loaders. |
int |
hashCode()
|
boolean |
isEmpty()
Return true if there are no internal class laoders. |
boolean |
removeClassLoader(ClassLoader loader)
Remove the given loader from the list. |
void |
setClassLoaders(MultiClassLoader multi)
Set the class loaders of this loader to those of the given loader. |
int |
size()
Return the number of internal class loaders. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ClassLoader THREAD_LOADER
public static final ClassLoader SYSTEM_LOADER
Constructor Detail |
---|
public MultiClassLoader()
public MultiClassLoader(MultiClassLoader other)
Method Detail |
---|
public boolean containsClassLoader(ClassLoader loader)
public ClassLoader[] getClassLoaders()
public ClassLoader getClassLoader(int index)
public boolean addClassLoader(ClassLoader loader)
public boolean addClassLoader(int index, ClassLoader loader)
public void setClassLoaders(MultiClassLoader multi)
public boolean addClassLoaders(int index, MultiClassLoader multi)
public boolean addClassLoaders(MultiClassLoader multi)
public boolean removeClassLoader(ClassLoader loader)
public void clear()
public int size()
public boolean isEmpty()
protected Class findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
protected URL findResource(String name)
findResource
in class ClassLoader
protected Enumeration findResources(String name) throws IOException
findResources
in class ClassLoader
IOException
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |