public final class ClassLoaderProvider extends Object
For extensions which define their own extended configuration definitions, the class loader will make sure that the configuration definition classes are loaded and initialized.
Initially the class loader provider is disabled, and calls to the getClassLoader()
will return
the system default class loader.
Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disable this class loader provider and removed any registered extensions.
|
void |
enable()
Enable this class loader provider using the application's class loader as the parent class loader.
|
void |
enable(ClassLoader parent)
Enable this class loader provider using the provided parent class loader.
|
ClassLoader |
getClassLoader()
Gets the class loader which should be used for loading classes and resources.
|
static ClassLoaderProvider |
getInstance()
Get the single application wide class loader provider instance.
|
boolean |
isEnabled()
Indicates whether this class loader provider is enabled.
|
String |
printExtensionInformation()
Prints out all information about extensions.
|
public static ClassLoaderProvider getInstance()
public void disable() throws IllegalStateException
IllegalStateException
- If this class loader provider is already disabled.public void enable() throws InitializationException, IllegalStateException
InitializationException
- If the class loader provider could not initialize successfully.IllegalStateException
- If this class loader provider is already enabled.public void enable(ClassLoader parent) throws InitializationException, IllegalStateException
parent
- The parent class loader.InitializationException
- If the class loader provider could not initialize successfully.IllegalStateException
- If this class loader provider is already enabled.public ClassLoader getClassLoader()
Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
public boolean isEnabled()
true
if this class loader provider is enabled.public String printExtensionInformation()
null
if there is no information available.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.