public abstract class SourceVisitor<R,P>
extends com.sun.source.util.TreePathScanner<R,P>
Modifier and Type | Field and Description |
---|---|
protected javax.lang.model.util.Elements |
elements
The
Elements helper to use when scanning. |
protected com.sun.source.tree.CompilationUnitTree |
root
The root of the AST that this
SourceVisitor will scan. |
protected com.sun.source.util.Trees |
trees
The
Trees instance to use for scanning. |
protected javax.lang.model.util.Types |
types
The
Types helper to use when scanning. |
Constructor and Description |
---|
SourceVisitor(SourceChecker checker)
Creates a
SourceVisitor to use for scanning a source tree. |
Modifier and Type | Method and Description |
---|---|
void |
setRoot(com.sun.source.tree.CompilationUnitTree root) |
void |
visit(com.sun.source.util.TreePath path) |
reduce, scan, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewArray, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitVariable, visitWhileLoop, visitWildcard
protected final com.sun.source.util.Trees trees
Trees
instance to use for scanning.protected final javax.lang.model.util.Elements elements
Elements
helper to use when scanning.protected final javax.lang.model.util.Types types
Types
helper to use when scanning.protected com.sun.source.tree.CompilationUnitTree root
SourceVisitor
will scan.public SourceVisitor(SourceChecker checker)
SourceVisitor
to use for scanning a source tree.checker
- the checker to invoke on the input source tree