public class ClassPoolRepository extends ScopedClassPoolRepositoryImpl
classpool, factory, registeredCLs| Modifier | Constructor and Description |
|---|---|
protected |
ClassPoolRepository()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClassPoolRepositoryCallback(ClassPoolRepositoryCallback callback)
Adds a callback object for notifications on classloader registration.
|
List<ClassPoolRepositoryCallback> |
getClassPoolRepositoryCallbacks()
Returns the callback objects.
|
static ClassPoolRepository |
getInstance()
Returns the singleton instance.
|
javassist.ClassPool |
registerClassLoader(ClassLoader classLoader)
Registers
classLoader and returns the corresponding ClassPool. |
boolean |
removeClassPoolRepositoryCallback(ClassPoolRepositoryCallback callback)
Removes a callback object.
|
void |
setClassPoolFactory(ScopedClassPoolFactory factory)
Defines the ClassPoolFactory that will be used by this repository.
|
void |
unregisterClassLoader(ClassLoader classLoader)
Unregisters
classLoader. |
clearUnregisteredClassLoaders, createScopedClassPool, findClassPool, getClassPoolFactory, getRegisteredCLs, insertDelegate, isPrune, setPrunepublic static ClassPoolRepository getInstance()
public void setClassPoolFactory(ScopedClassPoolFactory factory)
setClassPoolFactory in interface ScopedClassPoolRepositorysetClassPoolFactory in class ScopedClassPoolRepositoryImplfactory - the ClassPoolFactory that is responsible for creating ClassPools for this repository.
if this factory implements ClassLoaderRegistryHandlerFactory interface,
it will also be responsible for creating a ClassLoaderRegistryHandler for this
repositorypublic void addClassPoolRepositoryCallback(ClassPoolRepositoryCallback callback)
callback - the callback objectIllegalArgumentException - if the passed in callback was nullClassPoolRepositoryCallbackpublic List<ClassPoolRepositoryCallback> getClassPoolRepositoryCallbacks()
public boolean removeClassPoolRepositoryCallback(ClassPoolRepositoryCallback callback)
callback - the callback objectpublic javassist.ClassPool registerClassLoader(ClassLoader classLoader)
classLoader and returns the corresponding ClassPool.registerClassLoader in interface ScopedClassPoolRepositoryregisterClassLoader in class ScopedClassPoolRepositoryImplclassLoader - the ClassLoader to be added to this repositoryclassLoaderpublic void unregisterClassLoader(ClassLoader classLoader)
classLoader.unregisterClassLoader in interface ScopedClassPoolRepositoryunregisterClassLoader in class ScopedClassPoolRepositoryImplclassLoader - the ClassLoader to be removed from this repositoryCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.