Package com.google.errorprone.matchers
Class IsSameType<T extends com.sun.source.tree.Tree>
java.lang.Object
com.google.errorprone.matchers.AbstractTypeMatcher<T>
com.google.errorprone.matchers.IsSameType<T>
- All Implemented Interfaces:
Matcher<T>
,Serializable
public class IsSameType<T extends com.sun.source.tree.Tree> extends AbstractTypeMatcher<T>
Matches an AST node if its erased type is the same as the given type, e.g. If the type of the AST
node is
HashMap<K,V>
and the given type is HashMap
, then their erased type is the
same.- Author:
- yanx@google.com (Yan Xie)
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class com.google.errorprone.matchers.AbstractTypeMatcher
typeToCompareSupplier
-
Constructor Summary
Constructors Constructor Description IsSameType(Supplier<com.sun.tools.javac.code.Type> typeToCompareSupplier)
IsSameType(String typeString)
-
Method Summary
Modifier and Type Method Description boolean
matches(T tree, VisitorState state)