Package net.bytebuddy.matcher
Enum LatentMatcher.ForSelfDeclaredMethod
- java.lang.Object
-
- java.lang.Enum<LatentMatcher.ForSelfDeclaredMethod>
-
- net.bytebuddy.matcher.LatentMatcher.ForSelfDeclaredMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LatentMatcher.ForSelfDeclaredMethod>
,LatentMatcher<MethodDescription>
- Enclosing interface:
- LatentMatcher<T>
public static enum LatentMatcher.ForSelfDeclaredMethod extends java.lang.Enum<LatentMatcher.ForSelfDeclaredMethod> implements LatentMatcher<MethodDescription>
A latent matching methods that are declared by the resolved type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.LatentMatcher
LatentMatcher.Conjunction<S>, LatentMatcher.Disjunction<S>, LatentMatcher.ForFieldToken, LatentMatcher.ForMethodToken, LatentMatcher.ForRecordComponentToken, LatentMatcher.ForSelfDeclaredMethod, LatentMatcher.Resolved<S>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECLARED
Matches any method declared by the resolved type.NOT_DECLARED
Matches any method not declared by the resolved type.
-
Field Summary
Fields Modifier and Type Field Description private boolean
inverted
true
if the matcher is inverted.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForSelfDeclaredMethod(boolean inverted)
Creates a new latent matcher for a self-declared method.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementMatcher<? super MethodDescription>
resolve(TypeDescription typeDescription)
Resolves the element matcher this instance represents for the supplied type description.static LatentMatcher.ForSelfDeclaredMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LatentMatcher.ForSelfDeclaredMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DECLARED
public static final LatentMatcher.ForSelfDeclaredMethod DECLARED
Matches any method declared by the resolved type.
-
NOT_DECLARED
public static final LatentMatcher.ForSelfDeclaredMethod NOT_DECLARED
Matches any method not declared by the resolved type.
-
-
Method Detail
-
values
public static LatentMatcher.ForSelfDeclaredMethod[] 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 (LatentMatcher.ForSelfDeclaredMethod c : LatentMatcher.ForSelfDeclaredMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LatentMatcher.ForSelfDeclaredMethod 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
-
resolve
public ElementMatcher<? super MethodDescription> resolve(TypeDescription typeDescription)
Resolves the element matcher this instance represents for the supplied type description.- Specified by:
resolve
in interfaceLatentMatcher<MethodDescription>
- Parameters:
typeDescription
- The type description for which the represented matcher should be resolved.- Returns:
- An
ElementMatcher
that represents this matcher's resolved form.
-
-