public class ManifoldCFResourceLoader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
protected ClassLoader |
classLoader
The class loader we're caching
|
protected ArrayList |
currentClasspath
The current 'classpath' - a list of File objects
|
protected ClassLoader |
parent
The parent class loader
|
Constructor and Description |
---|
ManifoldCFResourceLoader(ClassLoader parent)
Construct a resource manager.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDirsToClassPath(File[] baseList,
FileFilter[] filterList)
Add fully-resolved directories (with filters) to the current class path.
|
void |
addToClassPath(File file)
Add to the class-search path.
|
void |
addToClassPath(File dir,
FileFilter filter)
Add to the class-search path.
|
void |
clearClassPath()
Clear the class-search path.
|
Class |
findClass(String cname)
Get the specified class using the proper classloader.
|
ClassLoader |
getClassLoader()
Get the class loader representing this resource loader.
|
void |
setClassPath(ArrayList libdirList)
Set the classpath to a given list of libdirs.
|
public static final String _rcsid
protected ClassLoader parent
protected ClassLoader classLoader
protected ArrayList currentClasspath
public ManifoldCFResourceLoader(ClassLoader parent) throws ManifoldCFException
parent
- is the parent class loader.ManifoldCFException
public void setClassPath(ArrayList libdirList) throws ManifoldCFException
libdirList
- is an arraylist of File objects, each representing a directory.ManifoldCFException
public void clearClassPath()
public void addToClassPath(File file) throws ManifoldCFException
file
- is the jar or class root.ManifoldCFException
public void addToClassPath(File dir, FileFilter filter) throws ManifoldCFException
dir
- is the directory to add.filter
- is the file filter to use on that directory.ManifoldCFException
public ClassLoader getClassLoader() throws ManifoldCFException
ManifoldCFException
public Class findClass(String cname) throws ClassNotFoundException, ManifoldCFException
cname
- is the fully-qualified class name.ClassNotFoundException
ManifoldCFException
protected void addDirsToClassPath(File[] baseList, FileFilter[] filterList) throws ManifoldCFException
baseList
- is the list of library directories.filterList
- is the corresponding list of filters.ManifoldCFException