org.sapia.clazzy
Class BaseClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--java.security.SecureClassLoader
|
+--org.sapia.clazzy.BaseClassLoader
- Direct Known Subclasses:
- CompositeClassLoader, FileSystemClassLoader, JarClassLoader
- public class BaseClassLoader
- extends SecureClassLoader
This class overrides the SecureClassLoader class. It allows
bypassing the delegation model, by which child classloaders are supposed to
resolve classes by first delegating the lookup to their parent classloader.
Inheriting classes should override this class' findClass(String)
method to support looking up classes from different sources. Accordingly,
inherinting classes should also override this class' resource-related methods,
such as findResource().
- Author:
- Yanick Duchesne
- Copyright:
- Copyright © 2002-2004 Sapia Open
Source Software . All Rights Reserved.
- License:
- Read the license.txt file of the jar or visit the license page at the Sapia
OSS web site
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseClassLoader
public BaseClassLoader()
BaseClassLoader
public BaseClassLoader(ClassLoader parent)
setParentFirst
public void setParentFirst(boolean parentFirst)
- Parameters:
parentFirst - if true, indicates that this instance should ask
its parent for the specified classes rather then looking them up
itself (this is the delegation model suggested by Java's API).
Defaults to true.
loadClass
public Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- Overrides:
loadClass in class ClassLoader
ClassNotFoundException- See Also:
ClassLoader.loadClass(java.lang.String, boolean)
Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.