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 aMethodSortMatcher.Sort
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MethodSortMatcher.Sort
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
Fields Modifier and Type Field Description private MethodSortMatcher.Sort
sort
The sort of method description to be matched by this element matcher.
-
Constructor Summary
Constructors Constructor Description MethodSortMatcher(MethodSortMatcher.Sort sort)
Creates a new element matcher that matches a specific sort of method description.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doMatch(T target)
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.java.lang.String
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 Detail
-
sort
private final MethodSortMatcher.Sort sort
The sort of method description to be matched by this element matcher.
-
-
Constructor Detail
-
MethodSortMatcher
public MethodSortMatcher(MethodSortMatcher.Sort sort)
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 Detail
-
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
protected boolean doMatch(T target)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-