Package javassist.scopedpool
Class ScopedClassPoolRepositoryImpl
java.lang.Object
javassist.scopedpool.ScopedClassPoolRepositoryImpl
- All Implemented Interfaces:
ScopedClassPoolRepository
An implementation of
ScopedClassPoolRepository.
It is an singleton.- Version:
- $Revision: 1.4 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassPoolThe default class poolprotected ScopedClassPoolFactoryThe factory for creating class poolsprivate static final ScopedClassPoolRepositoryImplThe instanceprivate booleanWhether to prune(package private) booleanWhether to prune when added to the classpool's cacheprotected Map<ClassLoader,ScopedClassPool> The registered classloaders -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method will check to see if a register classloader has been undeployed (as in JBoss)createScopedClassPool(ClassLoader cl, ClassPool src) Create a scoped classpool.Finds a scoped classpool registered under the passed in classloader.Obtains the recorded factory.static ScopedClassPoolRepositoryGet the instance.Get the registered classloaders.voidinsertDelegate(ScopedClassPoolRepository delegate) booleanisPrune()Returns the value of the prune attribute.Register a classloader.voidRecords a factory.voidsetPrune(boolean prune) Set the prune attribute.voidUnregisters a classpool and unregisters its classloader.
-
Field Details
-
instance
The instance -
prune
private boolean pruneWhether to prune -
pruneWhenCached
boolean pruneWhenCachedWhether to prune when added to the classpool's cache -
registeredCLs
The registered classloaders -
classpool
The default class pool -
factory
The factory for creating class pools
-
-
Constructor Details
-
ScopedClassPoolRepositoryImpl
private ScopedClassPoolRepositoryImpl()Singleton.
-
-
Method Details
-
getInstance
Get the instance.- Returns:
- the instance.
-
isPrune
public boolean isPrune()Returns the value of the prune attribute.- Specified by:
isPrunein interfaceScopedClassPoolRepository- Returns:
- the prune.
-
setPrune
public void setPrune(boolean prune) Set the prune attribute.- Specified by:
setPrunein interfaceScopedClassPoolRepository- Parameters:
prune- a new value.
-
createScopedClassPool
Create a scoped classpool.- Specified by:
createScopedClassPoolin interfaceScopedClassPoolRepository- Parameters:
cl- the classloader.src- the original classpool.- Returns:
- the classpool
-
findClassPool
Description copied from interface:ScopedClassPoolRepositoryFinds a scoped classpool registered under the passed in classloader.- Specified by:
findClassPoolin interfaceScopedClassPoolRepository- Parameters:
cl- the classloader.- Returns:
- the classpool.
-
registerClassLoader
Register a classloader.- Specified by:
registerClassLoaderin interfaceScopedClassPoolRepository- Parameters:
ucl- the classloader.- Returns:
- the classpool
-
getRegisteredCLs
Get the registered classloaders.- Specified by:
getRegisteredCLsin interfaceScopedClassPoolRepository- Returns:
- the registered classloaders.
-
clearUnregisteredClassLoaders
public void clearUnregisteredClassLoaders()This method will check to see if a register classloader has been undeployed (as in JBoss)- Specified by:
clearUnregisteredClassLoadersin interfaceScopedClassPoolRepository
-
unregisterClassLoader
Description copied from interface:ScopedClassPoolRepositoryUnregisters a classpool and unregisters its classloader.- Specified by:
unregisterClassLoaderin interfaceScopedClassPoolRepository- Parameters:
cl- the classloader the pool is stored under.
-
insertDelegate
-
setClassPoolFactory
Description copied from interface:ScopedClassPoolRepositoryRecords a factory.- Specified by:
setClassPoolFactoryin interfaceScopedClassPoolRepository
-
getClassPoolFactory
Description copied from interface:ScopedClassPoolRepositoryObtains the recorded factory.- Specified by:
getClassPoolFactoryin interfaceScopedClassPoolRepository
-