JBoss ClassPool Parent POM 1.0.0.GA

org.jboss.classpool.plugins
Class DelegatingClassPool

java.lang.Object
  extended by javassist.ClassPool
      extended by org.jboss.classpool.scoped.ScopedClassPool
          extended by org.jboss.classpool.spi.AbstractClassPool
              extended by org.jboss.classpool.base.BaseClassPool
                  extended by org.jboss.classpool.plugins.DelegatingClassPool

public class DelegatingClassPool
extends BaseClassPool

Base class for classpools backed by a domain

Version:
$Revision: 104979 $
Author:
Kabir Khan

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.classpool.spi.AbstractClassPool
AbstractClassPool.ClassPoolSearchStrategy
 
Field Summary
 
Fields inherited from class org.jboss.classpool.spi.AbstractClassPool
generatedClasses, loadedButNotWovenClasses, localResources, logger, SEARCH_ALL_STRATEGY, SEARCH_LOCAL_ONLY_STRATEGY
 
Fields inherited from class org.jboss.classpool.scoped.ScopedClassPool
classLoader, classPath, repository, softcache
 
Fields inherited from class javassist.ClassPool
childFirstLookup, classes, doPruning, parent, releaseUnmodifiedClassFile, source
 
Constructor Summary
DelegatingClassPool(ClassPoolDomain domain, ClassLoader cl, javassist.ClassPool parent, ScopedClassPoolRepository repository)
           
 
Method Summary
 void close()
          Closes the class pool
 javassist.CtClass get0(String classname, boolean useCache)
          Overrides ClassPool.get0() so that we can look up classes without caching them in the initiating pool.
 javassist.CtClass getCached(String classname)
          Get the cached class
 boolean isUnloadedClassLoader()
          Whether the classloader is loader
 javassist.CtClass loadLocally(String classname, String resourceName, boolean create)
           
 String toString()
           
 
Methods inherited from class org.jboss.classpool.base.BaseClassPool
createCtClass, get, getParent, isLocalClassLoaderResource, setParent
 
Methods inherited from class org.jboss.classpool.spi.AbstractClassPool
cacheCtClass, doneGeneratingClass, getClassPoolLogStringForClass, getResourceName, includeInGlobalSearch, isGeneratedClass, isLocalResource, registerGeneratedClass
 
Methods inherited from class org.jboss.classpool.scoped.ScopedClassPool
flushClass, getCachedLocally, getClassLoader, getClassLoader0, getLocally, lockInCache, soften, toClass
 
Methods inherited from class javassist.ClassPool
appendClassPath, appendClassPath, appendPathList, appendSystemPath, clearImportedPackages, find, get, getAndRename, getCtClass, getDefault, getImportedPackages, getMethod, getOrNull, importPackage, insertClassPath, insertClassPath, lookupCflow, makeClass, makeClass, makeClass, makeClass, makeClassIfNew, makeInterface, makeInterface, recordInvalidClassName, removeCached, removeClassPath, toClass, toClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingClassPool

public DelegatingClassPool(ClassPoolDomain domain,
                           ClassLoader cl,
                           javassist.ClassPool parent,
                           ScopedClassPoolRepository repository)
Method Detail

loadLocally

public javassist.CtClass loadLocally(String classname,
                                     String resourceName,
                                     boolean create)

get0

public final javassist.CtClass get0(String classname,
                                    boolean useCache)
                             throws javassist.NotFoundException
Overrides ClassPool.get0() so that we can look up classes without caching them in the initiating pool. The DelgatingClassPool + DomainClassPool handle the caching in the correct pool + handles the parentFirst functionality

Overrides:
get0 in class BaseClassPool
Throws:
javassist.NotFoundException

isUnloadedClassLoader

public boolean isUnloadedClassLoader()
Description copied from class: ScopedClassPool
Whether the classloader is loader

Overrides:
isUnloadedClassLoader in class ScopedClassPool
Returns:
false always

close

public void close()
Description copied from class: ScopedClassPool
Closes the class pool

Overrides:
close in class BaseClassPool

getCached

public javassist.CtClass getCached(String classname)
Description copied from class: ScopedClassPool
Get the cached class

Overrides:
getCached in class AbstractClassPool
Parameters:
classname - the class name
Returns:
the class

toString

public String toString()
Overrides:
toString in class AbstractClassPool

JBoss ClassPool Parent POM 1.0.0.GA

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.