Package net.bytebuddy.matcher
Enum ModifierMatcher.Mode
- java.lang.Object
-
- java.lang.Enum<ModifierMatcher.Mode>
-
- net.bytebuddy.matcher.ModifierMatcher.Mode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModifierMatcher.Mode>
- Enclosing class:
- ModifierMatcher<T extends ModifierReviewable>
public static enum ModifierMatcher.Mode extends java.lang.Enum<ModifierMatcher.Mode>
Determines the type of modifier to be matched by aModifierMatcher
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABSTRACT
Matches an element that is consideredabstract
.ANNOTATION
Matches a type that is considered an annotation.BRIDGE
Matches an element that is considered a bridge method.ENUMERATION
Matches a type or field for describing an enumeration.FINAL
Matches an element that is consideredfinal
.INTERFACE
Matches a type that is considered an interface.MANDATED
Matches a mandated parameter.NATIVE
Matches an element that is considerednative
.PRIVATE
Matches an element that is consideredprivate
.PROTECTED
Matches an element that is consideredprotected
.PUBLIC
Matches an element that is consideredpublic
.STATIC
Matches an element that is consideredstatic
.STRICT
Matches an element that is consideredstrict
.SYNCHRONIZED
Matches an element that is consideredsynchronized
.SYNTHETIC
Matches an element that is consideredsynthetic
.TRANSIENT
Matches a transient field.VAR_ARGS
Matches an element that is considered to be varargs.VOLATILE
Matches a volatile field.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
description
The textual representation of this instance's matching mode.private ModifierMatcher<?>
matcher
The canonical matcher instance.private int
modifiers
The mask of the modifier to match.
-
Constructor Summary
Constructors Modifier Constructor Description private
Mode(int modifiers, java.lang.String description)
Creates a new modifier matcher mode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getDescription()
Returns the textual description of this mode.protected ModifierMatcher<?>
getMatcher()
Returns a reusable matcher for this modifier sort.protected int
getModifiers()
Returns the modifiers to match by this mode.static ModifierMatcher.Mode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ModifierMatcher.Mode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUBLIC
public static final ModifierMatcher.Mode PUBLIC
Matches an element that is consideredpublic
.
-
PROTECTED
public static final ModifierMatcher.Mode PROTECTED
Matches an element that is consideredprotected
.
-
PRIVATE
public static final ModifierMatcher.Mode PRIVATE
Matches an element that is consideredprivate
.
-
FINAL
public static final ModifierMatcher.Mode FINAL
Matches an element that is consideredfinal
.
-
STATIC
public static final ModifierMatcher.Mode STATIC
Matches an element that is consideredstatic
.
-
SYNCHRONIZED
public static final ModifierMatcher.Mode SYNCHRONIZED
Matches an element that is consideredsynchronized
.
-
NATIVE
public static final ModifierMatcher.Mode NATIVE
Matches an element that is considerednative
.
-
STRICT
public static final ModifierMatcher.Mode STRICT
Matches an element that is consideredstrict
.
-
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 consideredsynthetic
.
-
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 consideredabstract
.
-
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 Detail
-
modifiers
private final int modifiers
The mask of the modifier to match.
-
description
private final java.lang.String description
The textual representation of this instance's matching mode.
-
matcher
private final ModifierMatcher<?> matcher
The canonical matcher instance.
-
-
Method Detail
-
values
public static ModifierMatcher.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModifierMatcher.Mode c : ModifierMatcher.Mode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModifierMatcher.Mode valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getDescription
protected java.lang.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.
-
-