Package edu.umd.cs.findbugs.util
Class SubtypeTypeMatcher
java.lang.Object
edu.umd.cs.findbugs.util.SubtypeTypeMatcher
- All Implemented Interfaces:
TypeMatcher
Type matcher that determines if a candidate Type is a subtype of a given
Type.
- Author:
- David Hovemeyer
-
Constructor Summary
ConstructorDescriptionSubtypeTypeMatcher
(ClassDescriptor classDescriptor) Constructor.SubtypeTypeMatcher
(org.apache.bcel.generic.ReferenceType supertype) Constructor. -
Method Summary
-
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
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 interfaceTypeMatcher
- Parameters:
t
- a Type- Returns:
- true if the Type matches, false otherwise
-
toString
-