|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.clirr.core.ClassSelector
public final class ClassSelector
Given a JavaClass object, determines whether or not it is "selected", based on its class or package. This is used to select subsets of the classes available in a classpath for comparison or testing purposes.
Nested Class Summary | |
---|---|
static class |
ClassSelector.Mode
Class for implementing an enumeration. |
Field Summary | |
---|---|
static ClassSelector.Mode |
MODE_IF
positive selection. |
static ClassSelector.Mode |
MODE_UNLESS
negative selection. |
Constructor Summary | |
---|---|
ClassSelector(ClassSelector.Mode mode)
Create a selector. |
Method Summary | |
---|---|
void |
addClass(java.lang.String classname)
Matches the class with exactly this name, plus any of its inner classes. |
void |
addPackage(java.lang.String packageName)
Matches any class which is in the named package. |
void |
addPackageTree(java.lang.String packageName)
Matches any class which is in the named package or any subpackage of it. |
boolean |
isSelected(org.apache.bcel.classfile.JavaClass clazz)
Return true if this class is one selected by the criteria stored in this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ClassSelector.Mode MODE_IF
public static final ClassSelector.Mode MODE_UNLESS
Constructor Detail |
---|
public ClassSelector(ClassSelector.Mode mode)
When mode is MODE_IF then a class is "selected" if-and-only-if the class matches one of the criteria defined via the addXXX methods. In other words, the criteria specify which classes are included (selected) in the resulting class set.
When mode is MODE_UNLESS, then a class is "selected" unless the class matches one of the criteria defined via the addXXX methods. In other words, the criteria specify which classes are excluded from the resulting class set.
Method Detail |
---|
public void addPackage(java.lang.String packageName)
public void addPackageTree(java.lang.String packageName)
public void addClass(java.lang.String classname)
public boolean isSelected(org.apache.bcel.classfile.JavaClass clazz)
isSelected
in interface ClassFilter
clazz
- a Java class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |