public abstract class AbstractClassLoader extends java.lang.ClassLoader
Constructor and Description |
---|
AbstractClassLoader(java.lang.ClassLoader parent)
Build a new instance of AbstractClassLoader.java.
|
Modifier and Type | Method and Description |
---|---|
void |
addLoader(ProxyClassLoader loader) |
ProxyClassLoader |
getCurrentLoader() |
ProxyClassLoader |
getParentLoader() |
java.net.URL |
getResource(java.lang.String name) |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Overrides the getResourceAsStream method to load non-class resources from
other sources, JarClassLoader is the only subclass in this project that
loads non-class resources from jar files
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name) |
ProxyClassLoader |
getSystemLoader() |
ProxyClassLoader |
getThreadLoader() |
java.lang.Class |
loadClass(java.lang.String className) |
java.lang.Class |
loadClass(java.lang.String className,
boolean resolveIt)
Overrides the loadClass method to load classes from other resources,
JarClassLoader is the only subclass in this project that loads classes
from jar files
|
public AbstractClassLoader(java.lang.ClassLoader parent)
parent
- parent class loaderpublic void addLoader(ProxyClassLoader loader)
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public java.lang.Class loadClass(java.lang.String className, boolean resolveIt) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
ClassLoader.loadClass(String, boolean)
public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream
in class java.lang.ClassLoader
ClassLoader.getResourceAsStream(java.lang.String)
public java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
getResources
in class java.lang.ClassLoader
java.io.IOException
public ProxyClassLoader getSystemLoader()
public ProxyClassLoader getParentLoader()
public ProxyClassLoader getCurrentLoader()
public ProxyClassLoader getThreadLoader()