Class MethodOverrideMatcher<T extends MethodDescription>
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T>
net.bytebuddy.matcher.MethodOverrideMatcher<T>
- Type Parameters:
T- The type of the matched entity.
- All Implemented Interfaces:
ElementMatcher<T>, ElementMatcher.Junction<T>
@Enhance
public class MethodOverrideMatcher<T extends MethodDescription>
extends ElementMatcher.Junction.ForNonNullValues<T>
A matcher that checks if any super type of a type declares a method with the same shape of a matched method.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ElementMatcher
ElementMatcher.Junction<S>Nested classes/interfaces inherited from interface ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W> -
Constructor Summary
ConstructorsConstructorDescriptionMethodOverrideMatcher(ElementMatcher<? super TypeDescription.Generic> matcher) Creates a new method override matcher. -
Method Summary
Methods inherited from class ElementMatcher.Junction.ForNonNullValues
matchesMethods inherited from class ElementMatcher.Junction.AbstractBase
and, or
-
Constructor Details
-
MethodOverrideMatcher
Creates a new method override matcher.- Parameters:
matcher- The matcher that is to be applied to the type that declares a method of the same shape.
-
-
Method Details
-
doMatch
Matches the supplied value if it was found not to benull.- Specified by:
doMatchin classElementMatcher.Junction.ForNonNullValues<T extends MethodDescription>- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
-