org.openorb.util.launcher
Class CompoundClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--org.openorb.util.launcher.CompoundClassLoader
- public final class CompoundClassLoader
- extends ClassLoader
A compound class loader that combines a parent and secondary class loader.
- Version:
- $Revision: 1.3 $ $Date: 2004/02/10 22:25:31 $
- Author:
- Richard G Clark
| Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Tries to find the class in the secondary class loader.
- Overrides:
findClass in class ClassLoader
- Parameters:
name - the class name- Returns:
- the resulting
Class object - Throws:
ClassNotFoundException - if the class could not be found
getResource
public URL getResource(String name)
- Tries to get the resource URL using the parent and secondary class
loaders.
- Overrides:
getResource in class ClassLoader
- Parameters:
name - resource name- Returns:
- a
URL for reading the resource, or
null if the resource could not be found or the
caller doesn't have adequate privileges to get the resource.
join
public static ClassLoader join(ClassLoader parent,
ClassLoader secondary)
- Returns a class loader for the specified parent and secondary class
loaders. If the secondary class loader is
null then
parent is returned.
- Parameters:
parent - the parent class loadersecondary - the secondary class loader, can be null- Returns:
- a class loader