Package net.bytebuddy.matcher
Enum Class MethodSortMatcher.Sort
- All Implemented Interfaces:
Serializable
,Comparable<MethodSortMatcher.Sort>
,Constable
- Enclosing class:
- MethodSortMatcher<T extends MethodDescription>
Represents a specific characteristic of a method description.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMatches method descriptions that represent constructors, not methods or the type initializer.Matches method descriptions that represent Java 8 default methods.Matches method descriptions that represent methods, not constructors or the type initializer.Matches method descriptions that represent the type initializers.Matches method descriptions that are overridable. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
A textual representation of the method sort that is represented by this instance.private final MethodSortMatcher<?>
A reusable matcher for this sort. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns a textual representation of this instance's method sort.protected MethodSortMatcher<?>
Returns the predefined matcher for this method sort.protected abstract boolean
isSort
(MethodDescription target) Determines if a method description is of the represented method sort.static MethodSortMatcher.Sort
Returns the enum constant of this class with the specified name.static MethodSortMatcher.Sort[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
METHOD
Matches method descriptions that represent methods, not constructors or the type initializer. -
CONSTRUCTOR
Matches method descriptions that represent constructors, not methods or the type initializer. -
TYPE_INITIALIZER
Matches method descriptions that represent the type initializers. -
VIRTUAL
Matches method descriptions that are overridable. -
DEFAULT_METHOD
Matches method descriptions that represent Java 8 default methods.
-
-
Field Details
-
description
A textual representation of the method sort that is represented by this instance. -
matcher
A reusable matcher for this sort.
-
-
Constructor Details
-
Sort
Creates a new method sort representation.- Parameters:
description
- A textual representation of the method sort that is represented by this instance.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isSort
Determines if a method description is of the represented method sort.- Parameters:
target
- A textual representation of the method sort that is represented by this instance.- Returns:
true
if the given method if of the method sort that is represented by this instance.
-
getDescription
Returns a textual representation of this instance's method sort.- Returns:
- A textual representation of this instance's method sort.
-
getMatcher
Returns the predefined matcher for this method sort.- Returns:
- The predefined matcher for this method sort.
-