|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.classloader.XClassLoaderConfiguration
public class XClassLoaderConfiguration
This class contains all information that is necessary to create a class loader.
The information is concentrated here to allow a proper construction of the class loader.
Without this class, it would be hard to design the class loader in a way, that is multi-threaded
to use because it is hard to decide, whether the class loader is fully initialized (a call
adding a directory to the class path would be possible at any time). To ensure, that a call changing
the configuration of the class loader doesn't influence the class loader, the configuration is
cloned when passed to a class loader, thus the configuration implements Cloneable
| Constructor Summary | |
|---|---|
XClassLoaderConfiguration()
Default constrcutor. |
|
| Method Summary | |
|---|---|
void |
addNonStandardPackage(java.lang.String packageName)
Adds a package that should \bnot\b be loaded by the standard class loader. |
void |
addRepositories(java.lang.String repositoryList)
This method adds a list of repository names, passed as string (each repository seperated by the standard File.pathSeparator from the others). |
void |
addRepository(java.lang.String repository)
This method adds a single repository given by name to the list of repositories maintained by this configuration. |
void |
addStandardPackage(java.lang.String packageName)
Adds a standard package that should be loaded by the standard class loader. |
java.lang.Object |
clone()
Configuration's are cloneable, so clone is implemented as public method here. |
java.lang.String |
getName()
This method returns the name to be used for the class loader. |
PackageList |
getNonStandardPackages()
Returns the list of non-standard packages. |
java.lang.ClassLoader |
getParentClassLoader()
This returns the parent class loader to be used. |
java.util.List |
getRepositories()
This method returns the list of currently registered repositories. |
PackageList |
getStandardPackages()
Returns the list of standard packages. |
boolean |
getTryStandardClassLoaderFirst()
This method determines, whether the standard class loader should be tried before a lookup in the registered repositories. |
boolean |
isLoggingEnabled()
Gets the flag if logging is to be done at all (calling loggers in class loaders may lead to stack overflows on log-related resource loading errors). |
void |
printDebug(XClassLoaderBase cl)
Prints debug output to the given class loader's logger. |
void |
setLoggingEnabled(boolean loggingEnabled)
Sets the flag if logging is to be done at all (calling loggers in class loaders may lead to stack overflows on log-related resource loading errors). |
void |
setName(java.lang.String name)
This method sets the name for the class loader. |
void |
setParentClassLoader(java.lang.ClassLoader parentClassLoader)
This method sets the parent class loader. |
void |
setTryStandardClassLoaderFirst(boolean tryStandardClassLoaderFirst)
This method sets, whether the standard class loader should be tried before a lookup in the registered repositories. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XClassLoaderConfiguration()
| Method Detail |
|---|
public void printDebug(XClassLoaderBase cl)
cl - Class loaderpublic void addStandardPackage(java.lang.String packageName)
packageName - Package namepublic void addNonStandardPackage(java.lang.String packageName)
packageName - Package namepublic PackageList getStandardPackages()
public PackageList getNonStandardPackages()
public void setTryStandardClassLoaderFirst(boolean tryStandardClassLoaderFirst)
tryStandardClassLoaderFirst - If the standard loader should be tried firstpublic boolean getTryStandardClassLoaderFirst()
public void addRepositories(java.lang.String repositoryList)
File.pathSeparator from the others).
repositoryList - A list of repository namespublic void addRepository(java.lang.String repository)
repository - The repository to be addedpublic java.util.List getRepositories()
public void setName(java.lang.String name)
name - The name to be setpublic java.lang.String getName()
public void setParentClassLoader(java.lang.ClassLoader parentClassLoader)
parentClassLoader - The parent class loader to be setpublic java.lang.ClassLoader getParentClassLoader()
public boolean isLoggingEnabled()
public void setLoggingEnabled(boolean loggingEnabled)
public java.lang.Object clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||