| java.lang.Object com.sun.tools.javadoc.ModifierFilter
ModifierFilter | public class ModifierFilter (Code) | | A class whose instances are filters over Modifier bits.
Filtering is done by returning boolean values.
Classes, methods and fields can be filtered, or filtering
can be done directly on modifier bits.
See Also: com.sun.tools.javac.code.Flags; version: 07/05/05 author: Robert Field |
Field Summary | |
final public static long | ALL_ACCESS All access modifiers. | final public static long | PACKAGE Package private access.
A "pseudo-" modifier bit that can be used in the
constructors of this class to specify package private
access. |
Constructor Summary | |
public | ModifierFilter(long oneOf) Constructor - Specify a filter. | public | ModifierFilter(long oneOf, long must, long cannot) Constructor - Specify a filter.
For example, the filter below will only pass synchronized
methods that are private or package private access and are
not native or static.
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. |
Method Summary | |
public boolean | checkModifier(int modifierBits) Filter on modifier bits. |
ALL_ACCESS | final public static long ALL_ACCESS(Code) | | All access modifiers.
A short-hand set of modifier bits that can be used in the
constructors of this class to specify all access modifiers,
Same as PRIVATE | PROTECTED | PUBLIC | PACKAGE.
|
PACKAGE | final public static long PACKAGE(Code) | | Package private access.
A "pseudo-" modifier bit that can be used in the
constructors of this class to specify package private
access. This is needed since there is no Modifier.PACKAGE.
|
ModifierFilter | public ModifierFilter(long oneOf)(Code) | | Constructor - Specify a filter.
Parameters: oneOf - If zero, everything passes the filter.If non-zero, at least one of the specifiedbits must be on in the modifier bits to pass the filter. |
ModifierFilter | public ModifierFilter(long oneOf, long must, long cannot)(Code) | | Constructor - Specify a filter.
For example, the filter below will only pass synchronized
methods that are private or package private access and are
not native or static.
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:
Parameters: oneOf - If zero, ignore this argument.If non-zero, at least one of the bits must be on. Parameters: must - All bits specified must be on. Parameters: cannot - None of the bits specified can be on. |
checkModifier | public boolean checkModifier(int modifierBits)(Code) | | Filter on modifier bits.
Parameters: modifierBits - Bits as specified in the Modifier class Whether the modifierBits pass this filter. |
|
|