|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.cocoon.components.classloader.RepositoryClassLoader
public class RepositoryClassLoader
A class loader with a growable list of path search directories. BL: Changed to extend URLClassLoader for both maintenance and compatibility reasons. It doesn't hurt that it runs quicker now as well.
| Field Summary | |
|---|---|
protected Logger |
log
The logger |
| Constructor Summary | |
|---|---|
|
RepositoryClassLoader()
Create an empty new class loader. |
protected |
RepositoryClassLoader(Collection repositories)
Create a class loader from a list of directories |
|
RepositoryClassLoader(URL[] urls)
Create an empty new class loader. |
|
RepositoryClassLoader(URL[] urls,
ClassLoader parentClassLoader)
Create an empty new class loader. |
protected |
RepositoryClassLoader(Vector repositories)
Create a class loader from a list of directories |
| Method Summary | |
|---|---|
void |
addDirectory(File repository)
Add a directory to the list of searchable repositories. |
void |
addDirectory(String repository)
Add a directory to the list of searchable repositories. |
void |
addURL(URL url)
Add a url to the list of searchable repositories |
Class |
defineClass(byte[] b)
Create a Class from a byte array |
void |
enableLogging(Logger logger)
Provide component with a logger. |
| Methods inherited from class java.net.URLClassLoader |
|---|
definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Logger log
| Constructor Detail |
|---|
public RepositoryClassLoader()
public RepositoryClassLoader(URL[] urls)
public RepositoryClassLoader(URL[] urls,
ClassLoader parentClassLoader)
protected RepositoryClassLoader(Vector repositories)
repositories - List of searchable directoriesprotected RepositoryClassLoader(Collection repositories)
repositories - List of searchable directories| Method Detail |
|---|
public void enableLogging(Logger logger)
enableLogging in interface LogEnabledlogger - the logger
public void addDirectory(File repository)
throws IOException
repository - The directory path
IOException - Non-existent, non-readable or non-directory repository
public void addDirectory(String repository)
throws IOException
repository - The directory path
IOException - Non-existent, non-readable or non-directory repositorypublic void addURL(URL url)
addURL in class URLClassLoader
public Class defineClass(byte[] b)
throws ClassFormatError
ClassFormatError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||