public class ModifierFilter extends Modifier
Modifier| Modifier and Type | Field and Description |
|---|---|
static long |
ALL_ACCESS
All access modifiers.
|
static long |
PACKAGE
Package private access.
|
| Constructor and Description |
|---|
ModifierFilter(long oneOf)
Constructor - Specify a filter.
|
ModifierFilter(long oneOf,
long must,
long cannot)
Constructor - Specify a filter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkClass(ClassDefinition cdef)
Filter a ClassDefinition.
|
boolean |
checkMember(MemberDefinition field)
Filter a MemberDefinition.
|
boolean |
checkModifier(int modifierBits)
Filter on modifier bits.
|
classModifiers, constructorModifiers, fieldModifiers, interfaceModifiers, isAbstract, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, methodModifiers, toStringpublic static final long PACKAGE
public static final long ALL_ACCESS
public ModifierFilter(long oneOf)
oneOf - If zero, everything passes the filter.
If non-zero, at least one of the specified
bits must be on in the modifier bits to
pass the filter.public ModifierFilter(long oneOf,
long must,
long cannot)
ModifierFilter( Modifier.PRIVATE | ModifierFilter.PACKAGE,
Modifier.SYNCHRONIZED,
Modifier.NATIVE | Modifier.STATIC)
Each of the three arguments must either be zero or the or'ed combination of the bits specified in the class Modifier or this class. During filtering, these values are compared against the modifier bits as follows:
oneOf - If zero, ignore this argument.
If non-zero, at least one of the bits must be on.must - All bits specified must be on.cannot - None of the bits specified can be on.public boolean checkModifier(int modifierBits)
modifierBits - Bits as specified in the Modifier classpublic boolean checkMember(MemberDefinition field)
field - A MemberDefinitionsun.tools.MemberDefinitionpublic boolean checkClass(ClassDefinition cdef)
cdef - A ClassDefinitionsun.tools.ClassDefinitionCopyright © 2017. All Rights Reserved.