bsh.classpath
Class BshClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
bsh.classpath.BshClassLoader
- Direct Known Subclasses:
- DiscreteFilesClassLoader
- public class BshClassLoader
- extends URLClassLoader
One of the things BshClassLoader does is to address a deficiency in
URLClassLoader that prevents us from specifying individual classes
via URLs.
Method Summary |
void |
addURL(URL url)
|
protected Class |
findClass(String name)
Find the correct source for the class... |
Class |
loadClass(String name,
boolean resolve)
This modification allows us to reload classes which are in the
Java VM user classpath. |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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 |
BshClassLoader
public BshClassLoader(BshClassManager classManager,
URL[] bases)
- Parameters:
bases
- URLs JARClassLoader seems to require absolute paths
BshClassLoader
public BshClassLoader(BshClassManager classManager,
BshClassPath bcp)
BshClassLoader
protected BshClassLoader(BshClassManager classManager)
- For use by children
addURL
public void addURL(URL url)
loadClass
public Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- This modification allows us to reload classes which are in the
Java VM user classpath. We search first rather than delegate to
the parent classloader (or bootstrap path) first.
- Throws:
ClassNotFoundException
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Find the correct source for the class...
Try designated loader if any
Try our URLClassLoader paths if any
Try base loader if any
Try system ???
- Throws:
ClassNotFoundException
© 2000 pat@pat.net :-)