Class SubtypeTypeMatcher

java.lang.Object
edu.umd.cs.findbugs.util.SubtypeTypeMatcher
All Implemented Interfaces:
TypeMatcher

public class SubtypeTypeMatcher extends Object implements TypeMatcher
Type matcher that determines if a candidate Type is a subtype of a given Type.
Author:
David Hovemeyer
  • Constructor Details

    • SubtypeTypeMatcher

      public SubtypeTypeMatcher(org.apache.bcel.generic.ReferenceType supertype)
      Constructor.
      Parameters:
      supertype - a ReferenceType: this TypeMatcher will test whether or not candidate Types are subtypes of this Type
    • SubtypeTypeMatcher

      public SubtypeTypeMatcher(ClassDescriptor classDescriptor)
      Constructor.
      Parameters:
      classDescriptor - a ClassDescriptor naming a class: this TypeMatcher will test whether or not candidate Types are subtypes of the class
  • Method Details

    • matches

      public boolean matches(org.apache.bcel.generic.Type t)
      Description copied from interface: TypeMatcher
      Determine whether given type matches this predicate.
      Specified by:
      matches in interface TypeMatcher
      Parameters:
      t - a Type
      Returns:
      true if the Type matches, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object