Class ModifierFilter

java.lang.Object
gw.gosudoc.com.sun.tools.javadoc.main.ModifierFilter

@Deprecated public class ModifierFilter extends Object
Deprecated.
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.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

See Also:
  • Flags
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
    Deprecated.
     
    static final long
    Deprecated.
    All access modifiers.
    private long
    Deprecated.
     
    private long
    Deprecated.
     
    private long
    Deprecated.
     
    static final long
    Deprecated.
    Package private access.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModifierFilter(long oneOf)
    Deprecated.
    Constructor - Specify a filter.
    ModifierFilter(long oneOf, long must, long cannot)
    Deprecated.
    Constructor - Specify a filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkModifier(int modifierBits)
    Deprecated.
    Filter on modifier bits.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PACKAGE

      public static final long PACKAGE
      Deprecated.
      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.
      See Also:
    • ALL_ACCESS

      public static final long ALL_ACCESS
      Deprecated.
      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.
      See Also:
    • oneOf

      private long oneOf
      Deprecated.
    • must

      private long must
      Deprecated.
    • cannot

      private long cannot
      Deprecated.
    • ACCESS_BITS

      private static final int ACCESS_BITS
      Deprecated.
      See Also:
  • Constructor Details

    • ModifierFilter

      public ModifierFilter(long oneOf)
      Deprecated.
      Constructor - Specify a filter.
      Parameters:
      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.
    • ModifierFilter

      public ModifierFilter(long oneOf, long must, long cannot)
      Deprecated.
      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.
      must - All bits specified must be on.
      cannot - None of the bits specified can be on.
  • Method Details

    • checkModifier

      public boolean checkModifier(int modifierBits)
      Deprecated.
      Filter on modifier bits.
      Parameters:
      modifierBits - Bits as specified in the Modifier class
      Returns:
      Whether the modifierBits pass this filter.