public abstract class Loader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
Loader() |
protected |
Loader(java.lang.ClassLoader loader) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildClassPath(java.util.ArrayList<java.lang.String> pathList)
Adds the sourcepath of this loader.
|
protected void |
buildSourcePath(java.util.ArrayList<java.lang.String> pathList)
Adds the sourcepath of this loader.
|
protected void |
destroy()
Destroys the loader.
|
protected ClassEntry |
getClassEntry(java.lang.String name,
java.lang.String pathName)
Returns the class entry.
|
DynamicClassLoader |
getClassLoader()
Gets the owning class loader.
|
protected java.security.CodeSource |
getCodeSource(Path path)
Returns the code source for the path.
|
protected long |
getHashCrc(long crc64) |
Path |
getPath(java.lang.String name)
Returns a path for the given name.
|
java.net.URL |
getResource(java.lang.String name)
Returns the resource
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Opens the stream to the resource.
|
void |
getResources(java.util.Vector<java.net.URL> resources,
java.lang.String name)
Returns the resource
|
void |
init()
Initialize the loader
|
boolean |
isDirectoryLoader() |
protected java.lang.Class<?> |
loadClass(java.lang.String name)
Loads the class directly, e.g.
|
protected Path |
lookupPath(Path path,
java.lang.String name) |
void |
setLoader(DynamicClassLoader loader)
Sets the owning class loader.
|
void |
validate()
Validates the loader.
|
public boolean isDirectoryLoader()
public void setLoader(DynamicClassLoader loader)
public DynamicClassLoader getClassLoader()
public void validate() throws ConfigException
ConfigException
@PostConstruct public void init()
protected java.lang.Class<?> loadClass(java.lang.String name)
protected ClassEntry getClassEntry(java.lang.String name, java.lang.String pathName) throws java.lang.ClassNotFoundException
name
- name of the classjava.lang.ClassNotFoundException
public java.net.URL getResource(java.lang.String name)
name
- name of the resourcepublic void getResources(java.util.Vector<java.net.URL> resources, java.lang.String name)
name
- name of the resourcepublic java.io.InputStream getResourceAsStream(java.lang.String name)
name
- name of the resourcepublic Path getPath(java.lang.String name)
protected java.security.CodeSource getCodeSource(Path path)
protected long getHashCrc(long crc64)
protected void buildClassPath(java.util.ArrayList<java.lang.String> pathList)
protected void buildSourcePath(java.util.ArrayList<java.lang.String> pathList)
protected void destroy()