|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectclasspathhelper.CGClassLoaderFilterAdapter
Adapter class for CGClassLoaderFilter. Subclasses can
optionally overload any method.
Default method implementations are as follows:
acceptItem(classpathhelper.CGClassLoader, classpathhelper.ClassStore) - returns trueinvertSearchOrder(classpathhelper.CGClassLoader, java.lang.String) - returns falseallowsHasBlocked(classpathhelper.CGClassLoader, java.lang.String) - returns trueallowInUnresolved(classpathhelper.CGClassLoader, java.lang.String) - returns true
| Constructor Summary | |
CGClassLoaderFilterAdapter()
|
|
| Method Summary | |
boolean |
acceptItem(CGClassLoader classLoader,
ClassStore classStore)
Filtering method used to determine if a class store should be allowed by the classloader. |
boolean |
allowInUnresolved(CGClassLoader classLoader,
java.lang.String className)
Method used to indicate that a class should not be added as unresolved. |
boolean |
allowsHasBlocked(CGClassLoader classLoader,
java.lang.String pathName)
Method used to indicate if the resource with the supplied name should have its blocked byte code values calculated. |
boolean |
invertSearchOrder(CGClassLoader classLoader,
java.lang.String className)
Filtering method used to allow some classes to invert the classloading search order for specific classes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CGClassLoaderFilterAdapter()
| Method Detail |
public boolean acceptItem(CGClassLoader classLoader,
ClassStore classStore)
CGClassLoaderFilterFiltering method used to determine if a class store should be allowed by the classloader.
This method is called during initial construction to determine which class stores and locations to include. It is not called when looking up classes or ClassDetails.
acceptItem in interface CGClassLoaderFilterclassLoader - The classloader where this class store
resides.classStore - The ClassStore.
true If this class store should be
included on the classpath, otherwise false.
public boolean invertSearchOrder(CGClassLoader classLoader,
java.lang.String className)
CGClassLoaderFilterFiltering method used to allow some classes to invert the classloading search order for specific classes. The practical application of this filtering method is to allow some classes (such as XML parsers) to be searched via the parent classloader even if the classloader is configured to search itself first.
The prefix invert is used to indicate that classes accepted by this filtering method will have the opposite searching order as to that of the class loader. So if a class loader is configured to search itself before its parents an invertedSearchOrder class will search the parent first. If a class loader is configured to search its parent first (the default) an invertedSearchOrder will search the class loader first.
invertSearchOrder in interface CGClassLoaderFilterclassLoader - The class loader this class is being looked
up in.className - The class to look for inverted searching.
true If the classes search order should be
inverted, otherwise false.
public boolean allowsHasBlocked(CGClassLoader classLoader,
java.lang.String pathName)
CGClassLoaderFilterMethod used to indicate if the resource with the supplied name should
have its blocked byte code values calculated. In some cases (such as
META-INF/MANIFEST.MF blocked bytes are not relavent because
that resource is loaded via ClassLoader.getResources(String).
allowsHasBlocked in interface CGClassLoaderFilterclassLoader - The class loader this filter applies to.pathName - The name of the resource (since using resources, class
names appear as package1/package2/SomeClass.class not
package1.package2.SomeClass
true if this resource should have blocked info calculated
otherwise, false
public boolean allowInUnresolved(CGClassLoader classLoader,
java.lang.String className)
CGClassLoaderFilterMethod used to indicate that a class should not be added as unresolved. In cases where a class is known not to exist (or its non existence is not important), this will allow the class to not appear as unresolved.
allowInUnresolved in interface CGClassLoaderFilterclassLoader - The class loader the class is from.className - The name of the class not to add as unresolved.
true if this class is allowed to be in other
classes unresolved list. Otherwise, false.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||