public class JHelpClassLoader
extends java.lang.ClassLoader
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<java.io.File> |
files
File list
|
private java.util.Hashtable<java.lang.String,java.lang.Class<?>> |
loadedClass
Already loaded classes
|
private java.util.ArrayList<java.lang.ClassLoader> |
loaders
Class loaders
|
Constructor and Description |
---|
JHelpClassLoader()
Constructs JHelpClassLoader
|
JHelpClassLoader(java.lang.ClassLoader parent)
Constructs JHelpClassLoader
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.ClassLoader classLoader)
Add class loader
|
void |
add(java.io.File file)
Add a file.
|
java.net.URL |
getResource(java.lang.String name)
URL for a resources
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Get resource as stream for read
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
List of resources of same name
|
private void |
initialize()
Initialize the loader
|
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean resolve)
Load a class
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
private java.util.ArrayList<java.io.File> files
private java.util.Hashtable<java.lang.String,java.lang.Class<?>> loadedClass
private java.util.ArrayList<java.lang.ClassLoader> loaders
public JHelpClassLoader()
public JHelpClassLoader(java.lang.ClassLoader parent)
parent
- Class loader parentprivate void initialize()
protected java.lang.Class<?> loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
name
- Class complete nameresolve
- Indicates if need to resolvejava.lang.ClassNotFoundException
- If class is not foundClassLoader.loadClass(java.lang.String, boolean)
public void add(java.lang.ClassLoader classLoader)
classLoader
- Class loader to addpublic void add(java.io.File file)
file
- File to addpublic java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
name
- Resource complete namenull
if not foundClassLoader.getResource(java.lang.String)
public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream
in class java.lang.ClassLoader
name
- Resource complete namenull
if not foundClassLoader.getResourceAsStream(java.lang.String)
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
getResources
in class java.lang.ClassLoader
name
- Resource complete namejava.io.IOException
- On reading problemClassLoader.getResources(java.lang.String)