public class RationalFtClassLoader
extends java.lang.ClassLoader
Constructor and Description |
---|
RationalFtClassLoader(java.lang.String[] path)
Construct an FtClassLoader, and give it the path it should use
for loading our classes.
|
RationalFtClassLoader(java.lang.String[] path,
java.lang.ClassLoader parentClassLoader)
Construct an FtClassLoader, and give it the path it should use
for loading our classes.
|
Modifier and Type | Method and Description |
---|---|
void |
append(java.lang.String[] path)
Append the specified directories and jars to the existing path
|
protected java.net.URL |
findResource(java.lang.String name)
Overrides the same-named method in ClassLoader.
|
java.net.URL |
getResource(java.lang.String name)
Overrides the same-named method in ClassLoader.
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Overrides the same-named method in ClassLoader.
|
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
This overrides ClassLoader.loadClass().
|
void |
prepend(java.lang.String[] path)
Prepend the specified directories and jars to the existing path
|
byte[] |
readFile(java.lang.String fileName)
This is our readFile(), overriding the one in ClassLoader.
|
clearAssertionStatus, clone, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public RationalFtClassLoader(java.lang.String[] path)
path
- The directories and jars (separated by the
path.separator
File.pathSeparator
public RationalFtClassLoader(java.lang.String[] path, java.lang.ClassLoader parentClassLoader)
path
- The directories and jars (separated by the
path.separator
File.pathSeparator
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public byte[] readFile(java.lang.String fileName)
fileName
- The file namenull - not found.
public java.io.InputStream getResourceAsStream(java.lang.String name)
Returns an input stream for reading the specified resource.
getResourceAsStream
in class java.lang.ClassLoader
name
- the resource namenull
if the resource could not be foundpublic java.net.URL getResource(java.lang.String name)
The name of a resource is a "/"-separated path name that identifies the resource.
getResource
in class java.lang.ClassLoader
name
- resource namenull
if
the resource could not be found or the caller doesn't have
adequate privileges to get the resource.findResource(String)
protected java.net.URL findResource(java.lang.String name)
findResource
in class java.lang.ClassLoader
name
- the resource namenull
if the resource could not be foundpublic void append(java.lang.String[] path)
path
- The directories and jars (separated by the
path.separator
File.pathSeparator
public void prepend(java.lang.String[] path)
path
- The directories and jars (separated by the
path.separator
File.pathSeparator