|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.loader.Loader
com.caucho.loader.SimpleLoader
@Configurable public class SimpleLoader
Class loader which checks for changes in class files and automatically picks up new jars.
| Constructor Summary | |
|---|---|
SimpleLoader()
Null constructor for the simple loader. |
|
SimpleLoader(java.lang.ClassLoader loader)
|
|
SimpleLoader(DynamicClassLoader loader,
Path path)
Creates the simple loader with the specified path. |
|
SimpleLoader(DynamicClassLoader loader,
Path path,
java.lang.String prefix)
Creates the simple loader with the specified path and prefix. |
|
| Method Summary | |
|---|---|
protected void |
buildClassPath(java.util.ArrayList<java.lang.String> pathList)
Adds the class of this resource. |
static DynamicClassLoader |
create(java.lang.ClassLoader parent,
Path path)
Create a class loader based on the SimpleLoader |
static DynamicClassLoader |
create(java.lang.ClassLoader parent,
Path path,
java.lang.String prefix)
Create a class loader based on the SimpleLoader |
static DynamicClassLoader |
create(Path path)
Create a class loader based on the SimpleLoader |
protected java.security.CodeSource |
getCodeSource(Path path)
Returns the code source for the directory. |
Path |
getPath()
Gets the resource path. |
Path |
getPath(java.lang.String name)
Given a class or resource name, returns a patch to that resource. |
java.lang.String |
getPrefix()
Gets the resource prefix |
void |
init()
Initializes the loader. |
boolean |
isDirectoryLoader()
The simple-loader scans class directories. |
void |
setLoader(DynamicClassLoader loader)
Sets the owning class loader. |
void |
setPath(Path path)
Sets the resource directory. |
void |
setPrefix(java.lang.String prefix)
Sets the resource prefix |
java.lang.String |
toString()
Returns a printable representation of the loader. |
| Methods inherited from class com.caucho.loader.Loader |
|---|
buildSourcePath, destroy, getClassEntry, getClassLoader, getResource, getResourceAsStream, getResources, loadClass, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleLoader()
public SimpleLoader(java.lang.ClassLoader loader)
public SimpleLoader(DynamicClassLoader loader,
Path path)
path - specifying the root of the resources
public SimpleLoader(DynamicClassLoader loader,
Path path,
java.lang.String prefix)
path - specifying the root of the resourcesprefix - the prefix that the resources must match| Method Detail |
|---|
public static DynamicClassLoader create(java.lang.ClassLoader parent,
Path path,
java.lang.String prefix)
parent - parent class loaderpath - traditional classpathprefix - the class prefix restriction
public static DynamicClassLoader create(java.lang.ClassLoader parent,
Path path)
parent - parent class loaderpath - traditional classpath
public static DynamicClassLoader create(Path path)
path - traditional classpath
public void setPath(Path path)
public Path getPath()
public void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public void setLoader(DynamicClassLoader loader)
setLoader in class Loaderpublic boolean isDirectoryLoader()
isDirectoryLoader in class Loader
@PostConstruct
public void init()
throws ConfigException
init in class LoaderConfigExceptionpublic Path getPath(java.lang.String name)
getPath in class Loadername - the class or resource name.
protected java.security.CodeSource getCodeSource(Path path)
getCodeSource in class Loaderprotected void buildClassPath(java.util.ArrayList<java.lang.String> pathList)
buildClassPath in class Loaderpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||