Enum ModifierMatcher.Mode

java.lang.Object
java.lang.Enum<ModifierMatcher.Mode>
net.bytebuddy.matcher.ModifierMatcher.Mode
All Implemented Interfaces:
Serializable, Comparable<ModifierMatcher.Mode>, java.lang.constant.Constable
Enclosing class:
ModifierMatcher<T extends ModifierReviewable>

public static enum ModifierMatcher.Mode extends Enum<ModifierMatcher.Mode>
Determines the type of modifier to be matched by a ModifierMatcher.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Matches an element that is considered abstract.
    Matches a type that is considered an annotation.
    Matches an element that is considered a bridge method.
    Matches a type or field for describing an enumeration.
    Matches an element that is considered final.
    Matches a type that is considered an interface.
    Matches a mandated parameter.
    Matches an element that is considered native.
    Matches an element that is considered private.
    Matches an element that is considered protected.
    Matches an element that is considered public.
    Matches an element that is considered static.
    Matches an element that is considered strict.
    Matches an element that is considered synchronized.
    Matches an element that is considered synthetic.
    Matches a transient field.
    Matches an element that is considered to be varargs.
    Matches a volatile field.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The textual representation of this instance's matching mode.
    private final ModifierMatcher<?>
    The canonical matcher instance.
    private final int
    The mask of the modifier to match.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Mode(int modifiers, String description)
    Creates a new modifier matcher mode.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Returns the textual description of this mode.
    protected ModifierMatcher<?>
    Returns a reusable matcher for this modifier sort.
    protected int
    Returns the modifiers to match by this mode.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PUBLIC

      public static final ModifierMatcher.Mode PUBLIC
      Matches an element that is considered public.
    • PROTECTED

      public static final ModifierMatcher.Mode PROTECTED
      Matches an element that is considered protected.
    • PRIVATE

      public static final ModifierMatcher.Mode PRIVATE
      Matches an element that is considered private.
    • FINAL

      public static final ModifierMatcher.Mode FINAL
      Matches an element that is considered final.
    • STATIC

      public static final ModifierMatcher.Mode STATIC
      Matches an element that is considered static.
    • SYNCHRONIZED

      public static final ModifierMatcher.Mode SYNCHRONIZED
      Matches an element that is considered synchronized.
    • NATIVE

      public static final ModifierMatcher.Mode NATIVE
      Matches an element that is considered native.
    • STRICT

      public static final ModifierMatcher.Mode STRICT
      Matches an element that is considered strict.
    • VAR_ARGS

      public static final ModifierMatcher.Mode VAR_ARGS
      Matches an element that is considered to be varargs.
    • SYNTHETIC

      public static final ModifierMatcher.Mode SYNTHETIC
      Matches an element that is considered synthetic.
    • BRIDGE

      public static final ModifierMatcher.Mode BRIDGE
      Matches an element that is considered a bridge method.
    • ABSTRACT

      public static final ModifierMatcher.Mode ABSTRACT
      Matches an element that is considered abstract.
    • INTERFACE

      public static final ModifierMatcher.Mode INTERFACE
      Matches a type that is considered an interface.
    • ANNOTATION

      public static final ModifierMatcher.Mode ANNOTATION
      Matches a type that is considered an annotation.
    • VOLATILE

      public static final ModifierMatcher.Mode VOLATILE
      Matches a volatile field.
    • TRANSIENT

      public static final ModifierMatcher.Mode TRANSIENT
      Matches a transient field.
    • MANDATED

      public static final ModifierMatcher.Mode MANDATED
      Matches a mandated parameter.
    • ENUMERATION

      public static final ModifierMatcher.Mode ENUMERATION
      Matches a type or field for describing an enumeration.
  • Field Details

    • modifiers

      private final int modifiers
      The mask of the modifier to match.
    • description

      private final String description
      The textual representation of this instance's matching mode.
    • matcher

      private final ModifierMatcher<?> matcher
      The canonical matcher instance.
  • Constructor Details

    • Mode

      private Mode(int modifiers, String description)
      Creates a new modifier matcher mode.
      Parameters:
      modifiers - The mask of the modifier to match.
      description - The textual representation of this instance's matching mode.
  • Method Details

    • values

      public static ModifierMatcher.Mode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ModifierMatcher.Mode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDescription

      protected String getDescription()
      Returns the textual description of this mode.
      Returns:
      The textual description of this mode.
    • getModifiers

      protected int getModifiers()
      Returns the modifiers to match by this mode.
      Returns:
      The modifiers to match by this mode.
    • getMatcher

      protected ModifierMatcher<?> getMatcher()
      Returns a reusable matcher for this modifier sort.
      Returns:
      A reusable matcher for this modifier sort.