|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.core.system.ManifoldCFResourceLoader
public class ManifoldCFResourceLoader
An instance of this class is capable of minting URLClassLoader objects on demand, for the purpose of loading plugins.
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected java.lang.ClassLoader |
classLoader
The class loader we're caching |
protected java.util.ArrayList |
currentClasspath
The current 'classpath' - a list of File objects |
protected java.lang.ClassLoader |
parent
The parent class loader |
| Constructor Summary | |
|---|---|
ManifoldCFResourceLoader(java.lang.ClassLoader parent)
Construct a resource manager. |
|
| Method Summary | |
|---|---|
protected void |
addDirsToClassPath(java.io.File[] baseList,
java.io.FileFilter[] filterList)
Add fully-resolved directories (with filters) to the current class path. |
void |
addToClassPath(java.io.File file)
Add to the class-search path. |
void |
addToClassPath(java.io.File dir,
java.io.FileFilter filter)
Add to the class-search path. |
void |
clearClassPath()
Clear the class-search path. |
java.lang.Class |
findClass(java.lang.String cname)
Get the specified class using the proper classloader. |
java.lang.ClassLoader |
getClassLoader()
Get the class loader representing this resource loader. |
void |
setClassPath(java.util.ArrayList libdirList)
Set the classpath to a given list of libdirs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
protected java.lang.ClassLoader parent
protected java.lang.ClassLoader classLoader
protected java.util.ArrayList currentClasspath
| Constructor Detail |
|---|
public ManifoldCFResourceLoader(java.lang.ClassLoader parent)
throws ManifoldCFException
parent - is the parent class loader.
ManifoldCFException| Method Detail |
|---|
public void setClassPath(java.util.ArrayList libdirList)
throws ManifoldCFException
libdirList - is an arraylist of File objects, each representing a directory.
ManifoldCFExceptionpublic void clearClassPath()
public void addToClassPath(java.io.File file)
throws ManifoldCFException
file - is the jar or class root.
ManifoldCFException
public void addToClassPath(java.io.File dir,
java.io.FileFilter filter)
throws ManifoldCFException
dir - is the directory to add.filter - is the file filter to use on that directory.
ManifoldCFException
public java.lang.ClassLoader getClassLoader()
throws ManifoldCFException
ManifoldCFException
public java.lang.Class findClass(java.lang.String cname)
throws java.lang.ClassNotFoundException,
ManifoldCFException
cname - is the fully-qualified class name.
java.lang.ClassNotFoundException
ManifoldCFException
protected void addDirsToClassPath(java.io.File[] baseList,
java.io.FileFilter[] filterList)
throws ManifoldCFException
baseList - is the list of library directories.filterList - is the corresponding list of filters.
ManifoldCFException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||