Class InstanceTypeMatcher<T>

java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
net.bytebuddy.matcher.InstanceTypeMatcher<T>
Type Parameters:
T - The exact type of the object that is matched.
All Implemented Interfaces:
ElementMatcher<T>, ElementMatcher.Junction<T>

@Enhance public class InstanceTypeMatcher<T> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches an object's type.
  • Field Details

  • Constructor Details

    • InstanceTypeMatcher

      public InstanceTypeMatcher(ElementMatcher<? super TypeDescription> matcher)
      Creates a new instance type matcher.
      Parameters:
      matcher - The matcher to apply to the object's 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