Class SuperTypeMatcher<T extends TypeDescription>

Type Parameters:
T - The type of the matched entity.
All Implemented Interfaces:
ElementMatcher<T>, ElementMatcher.Junction<T>

@Enhance public class SuperTypeMatcher<T extends TypeDescription> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches its argument for being another type's super type.
  • Field Details

    • typeDescription

      private final TypeDescription typeDescription
      The type to be matched being a sub type of the matched type.
  • Constructor Details

    • SuperTypeMatcher

      public SuperTypeMatcher(TypeDescription typeDescription)
      Creates a new matcher for matching its input for being a super type of the given typeDescription.
      Parameters:
      typeDescription - The type to be matched being a sub type of the matched 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