|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
edu.rice.cs.plt.reflect.ComposedClassLoader
public class ComposedClassLoader
A class loader defining the search for classes and resources to first check a parent loader, and then delegate to a child loader. This allows two distinct class loading hierarchies to be merged.
One application is to reverse the usual search order: if I'm given loader c and
would like to define an instance of MyLoader that delegates to c before checking
its own resources, I can invoke new MyLoader(c); on the other hand, if I want to check
the MyLoader's resources first, I might do so with a ComposedClassLoader:
new ComposedClassLoader(new MyLoader(null), c).
| Constructor Summary | |
|---|---|
ComposedClassLoader(java.lang.ClassLoader parent,
java.lang.ClassLoader child)
|
|
| Method Summary | |
|---|---|
protected java.lang.Class<?> |
findClass(java.lang.String name)
|
protected java.net.URL |
findResource(java.lang.String name)
|
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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 ComposedClassLoader(java.lang.ClassLoader parent,
java.lang.ClassLoader child)
| Method Detail |
|---|
protected java.lang.Class<?> findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
findClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionprotected java.net.URL findResource(java.lang.String name)
findResource in class java.lang.ClassLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||