Class SubtypeTypeMatcher

  • All Implemented Interfaces:
    TypeMatcher

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(org.apache.bcel.generic.Type t)
      Determine whether given type matches this predicate.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object