Class MethodReturnTypeMatcher<T extends MethodDescription>

java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
net.bytebuddy.matcher.MethodReturnTypeMatcher<T>
Type Parameters:
T - The type of the matched entity.
All Implemented Interfaces:
ElementMatcher<T>, ElementMatcher.Junction<T>

@Enhance public class MethodReturnTypeMatcher<T extends MethodDescription> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches its argument's return type against a given type matcher.
  • Field Details

  • Constructor Details

    • MethodReturnTypeMatcher

      public MethodReturnTypeMatcher(ElementMatcher<? super TypeDescription.Generic> matcher)
      Creates a new matcher for a matched element's return type.
      Parameters:
      matcher - The type matcher to apply to the matched element's return type.
  • Method Details

    • matches

      public boolean matches(T target)
      Matches a target against this element matcher.
      Parameters:
      target - The instance to be matched.
      Returns:
      true if the given element is matched by this matcher or false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object