Class Heuristics.Matcher
- java.lang.Object
-
- com.sun.source.util.SimpleTreeVisitor<java.lang.Boolean,java.lang.Void>
-
- org.checkerframework.framework.util.Heuristics.Matcher
-
- All Implemented Interfaces:
com.sun.source.tree.TreeVisitor<java.lang.Boolean,java.lang.Void>
- Direct Known Subclasses:
Heuristics.OfKind
,Heuristics.OrMatcher
,Heuristics.PreceededBy
,Heuristics.Within
,Heuristics.WithinTrueBranch
- Enclosing class:
- Heuristics
public static class Heuristics.Matcher extends com.sun.source.util.SimpleTreeVisitor<java.lang.Boolean,java.lang.Void>
A base class for tree-matching algorithms. Skips parentheses by default.
-
-
Constructor Summary
Constructors Constructor Description Matcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Boolean
defaultAction(com.sun.source.tree.Tree tree, java.lang.Void p)
boolean
match(com.sun.source.util.TreePath path)
Returns true if the given path matches this Matcher.java.lang.Boolean
visitParenthesized(com.sun.source.tree.ParenthesizedTree tree, java.lang.Void p)
-
Methods inherited from class com.sun.source.util.SimpleTreeVisitor
visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard
-
-
-
-
Method Detail
-
defaultAction
protected java.lang.Boolean defaultAction(com.sun.source.tree.Tree tree, java.lang.Void p)
- Overrides:
defaultAction
in classcom.sun.source.util.SimpleTreeVisitor<java.lang.Boolean,java.lang.Void>
-
visitParenthesized
public java.lang.Boolean visitParenthesized(com.sun.source.tree.ParenthesizedTree tree, java.lang.Void p)
- Specified by:
visitParenthesized
in interfacecom.sun.source.tree.TreeVisitor<java.lang.Boolean,java.lang.Void>
- Overrides:
visitParenthesized
in classcom.sun.source.util.SimpleTreeVisitor<java.lang.Boolean,java.lang.Void>
-
match
public boolean match(com.sun.source.util.TreePath path)
Returns true if the given path matches this Matcher.- Parameters:
path
- the path to test- Returns:
- true if the given path matches this Matcher
-
-