Package edu.umd.cs.findbugs.util
Class SubtypeTypeMatcher
- java.lang.Object
-
- edu.umd.cs.findbugs.util.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
-
-
Constructor Summary
Constructors Constructor Description SubtypeTypeMatcher(ClassDescriptor classDescriptor)
Constructor.SubtypeTypeMatcher(org.apache.bcel.generic.ReferenceType supertype)
Constructor.
-
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()
-
-
-
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 interfaceTypeMatcher
- Parameters:
t
- a Type- Returns:
- true if the Type matches, false otherwise
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-