public final class ClassSelector extends java.lang.Object implements ClassFilter
Modifier and Type | Class and Description |
---|---|
static class |
ClassSelector.Mode
Class for implementing an enumeration.
|
Modifier and Type | Field and Description |
---|---|
static ClassSelector.Mode |
MODE_IF
positive selection.
|
static ClassSelector.Mode |
MODE_UNLESS
negative selection.
|
Constructor and Description |
---|
ClassSelector(ClassSelector.Mode mode)
Create a selector.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final ClassSelector.Mode MODE_IF
public static final ClassSelector.Mode MODE_UNLESS
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.
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 classCopyright © 2003-2012 Lars K??hne. All Rights Reserved.