Package net.bytebuddy.matcher
Class MethodSortMatcher<T extends MethodDescription>
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<W>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T>
net.bytebuddy.matcher.MethodSortMatcher<T>
- Type Parameters:
T
- The type of the matched entity.
- All Implemented Interfaces:
ElementMatcher<T>
,ElementMatcher.Junction<T>
@Enhance
public class MethodSortMatcher<T extends MethodDescription>
extends ElementMatcher.Junction.ForNonNullValues<T>
Matches a method description by its general characteristics which are represented as a
MethodSortMatcher.Sort
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents a specific characteristic of a method description.Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodSortMatcher.Sort
The sort of method description to be matched by this element matcher. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new element matcher that matches a specific sort of method description. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Matches the supplied value if it was found not to benull
.static <T extends MethodDescription>
ElementMatcher.Junction<T>of
(MethodSortMatcher.Sort sort) Returns an element matcher that matches a specific sort of method description.toString()
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues
matches
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
sort
The sort of method description to be matched by this element matcher.
-
-
Constructor Details
-
MethodSortMatcher
Creates a new element matcher that matches a specific sort of method description.- Parameters:
sort
- The sort of method description to be matched by this element matcher.
-
-
Method Details
-
of
public static <T extends MethodDescription> ElementMatcher.Junction<T> of(MethodSortMatcher.Sort sort) Returns an element matcher that matches a specific sort of method description.- Type Parameters:
T
- The type of the matched entity.- Parameters:
sort
- The sort of method description to be matched by this element matcher.- Returns:
- A matcher that matches methods of the provided sort.
-
doMatch
Matches the supplied value if it was found not to benull
.- Specified by:
doMatch
in classElementMatcher.Junction.ForNonNullValues<T extends MethodDescription>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
toString
-