|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javassist.ClassPool org.apache.tapestry5.ioc.internal.services.ClassFactoryClassPool
public class ClassFactoryClassPool
Used to ensure that ClassPool.appendClassPath(javassist.ClassPath)
is invoked within a synchronized
lock, and also handles tricky class loading issues (caused by the creation of classes, and class loaders, at
runtime).
Field Summary |
---|
Fields inherited from class javassist.ClassPool |
---|
childFirstLookup, classes, doPruning, parent, releaseUnmodifiedClassFile, source |
Constructor Summary | |
---|---|
ClassFactoryClassPool(ClassLoader contextClassLoader)
|
Method Summary | |
---|---|
void |
addClassLoaderIfNeeded(ClassLoader loader)
Convienience method for adding to the ClassPath for a particular class loader. |
Class |
importClass(Class clazz)
Returns the nearest super-class of the provided class that can be converted to a CtClass . |
Class |
toClass(javassist.CtClass ct,
ClassLoader loader,
ProtectionDomain domain)
Overriden to remove a deadlock producing synchronized block. |
Methods inherited from class javassist.ClassPool |
---|
appendClassPath, appendClassPath, appendPathList, appendSystemPath, cacheCtClass, clearImportedPackages, createCtClass, find, get, get, get0, getAndRename, getCached, getClassLoader, getCtClass, getDefault, getImportedPackages, getMethod, getOrNull, importPackage, insertClassPath, insertClassPath, lookupCflow, makeClass, makeClass, makeClass, makeClass, makeClassIfNew, makeInterface, makeInterface, recordInvalidClassName, removeCached, removeClassPath, toClass, toClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassFactoryClassPool(ClassLoader contextClassLoader)
Method Detail |
---|
public Class importClass(Class clazz)
CtClass
. This is used to
filter out Hibernate-style proxies (created as subclasses of oridnary classes). This will automatically add the
class' classLoader to the pool's class path.
clazz
- class to import
public void addClassLoaderIfNeeded(ClassLoader loader)
loader
- the class loader to add (derived from a loaded class, and may be null for some system classes)public Class toClass(javassist.CtClass ct, ClassLoader loader, ProtectionDomain domain) throws javassist.CannotCompileException
toClass
in class javassist.ClassPool
javassist.CannotCompileException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |