public class ScopedClassPool
extends javassist.ClassPool
| Modifier and Type | Field and Description |
|---|---|
protected WeakReference<ClassLoader> |
classLoader |
protected javassist.LoaderClassPath |
classPath |
protected ScopedClassPoolRepository |
repository |
protected SoftValueHashMap |
softcache |
| Modifier | Constructor and Description |
|---|---|
protected |
ScopedClassPool(ClassLoader cl,
javassist.ClassPool src,
ScopedClassPoolRepository repository,
boolean isTemp)
Creates a new ScopedClassPool.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cacheCtClass(String classname,
javassist.CtClass c,
boolean dynamic)
Caches a class
|
void |
close()
Closes the class pool
|
void |
flushClass(String classname)
Flushes a class.
|
protected javassist.CtClass |
getCached(String classname)
Get the cached class
|
protected javassist.CtClass |
getCachedLocally(String classname)
Returns the class if it is cached in this pool.
|
ClassLoader |
getClassLoader()
Gets the class loader
|
protected ClassLoader |
getClassLoader0() |
javassist.CtClass |
getLocally(String classname)
Gets any local copy of the class
|
boolean |
isUnloadedClassLoader()
Whether the classloader is loader
|
void |
lockInCache(javassist.CtClass c)
Locks a class into the cache
|
void |
soften(javassist.CtClass clazz)
Softens a class
|
Class<?> |
toClass(javassist.CtClass ct,
ClassLoader loader,
ProtectionDomain domain)
Converts a javassist class to a java class
|
appendClassPath, appendClassPath, appendPathList, appendSystemPath, clearImportedPackages, createCtClass, find, get, get, get0, getAndRename, getCtClass, getDefault, getImportedPackages, getMethod, getOrNull, importPackage, insertClassPath, insertClassPath, lookupCflow, makeClass, makeClass, makeClass, makeClass, makeClassIfNew, makeInterface, makeInterface, makePackage, recordInvalidClassName, removeCached, removeClassPath, toClass, toClass, toStringprotected ScopedClassPoolRepository repository
protected WeakReference<ClassLoader> classLoader
protected javassist.LoaderClassPath classPath
protected SoftValueHashMap softcache
protected ScopedClassPool(ClassLoader cl, javassist.ClassPool src, ScopedClassPoolRepository repository, boolean isTemp)
cl - the classloadersrc - the original class poolrepository - the repositoryisTemp - whether this is a temporary pool used to
resolve referencespublic ClassLoader getClassLoader()
getClassLoader in class javassist.ClassPoolprotected ClassLoader getClassLoader0()
public void close()
public void flushClass(String classname)
classname - the class to flushpublic void soften(javassist.CtClass clazz)
clazz - the classpublic boolean isUnloadedClassLoader()
protected javassist.CtClass getCached(String classname)
getCached in class javassist.ClassPoolclassname - the class nameprotected void cacheCtClass(String classname, javassist.CtClass c, boolean dynamic)
cacheCtClass in class javassist.ClassPoolclassname - the class namec - the ctClassdynamic - whether the class is dynamically generatedpublic void lockInCache(javassist.CtClass c)
c - the classprotected javassist.CtClass getCachedLocally(String classname)
classname - the class namepublic javassist.CtClass getLocally(String classname) throws javassist.NotFoundException
classname - the class namejavassist.NotFoundException - when the class is not foundpublic Class<?> toClass(javassist.CtClass ct, ClassLoader loader, ProtectionDomain domain) throws javassist.CannotCompileException
toClass in class javassist.ClassPoolct - the javassist classloader - the loaderjavassist.CannotCompileException - for any errorCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.