Class DefinedShapeMatcher<T extends ByteCodeElement.TypeDependant<S,?>,S extends ByteCodeElement.TypeDependant<?,?>>

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

@Enhance public class DefinedShapeMatcher<T extends ByteCodeElement.TypeDependant<S,?>,S extends ByteCodeElement.TypeDependant<?,?>> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches a byte code's element's token against a matcher for such a token.
  • Field Details

  • Constructor Details

    • DefinedShapeMatcher

      public DefinedShapeMatcher(ElementMatcher<? super S> matcher)
      Creates a new matcher for a byte code element's defined shape.
      Parameters:
      matcher - The matcher to apply onto the defined shape of the matched entity.
  • 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