public class ExpectedTreesVisitor extends TreeScannerWithDefaults
getTrees() returns all the trees that should match with
some JavaParser node. Some trees shouldn't be matched with a JavaParser node because there isn't
a corresponding JavaParser node. These trees are excluded.
The primary purpose is to test the JointJavacJavaParserVisitor class when the
-AajavaChecks flag is used. That class traverses a javac tree and JavaParser AST simultaneously,
so the trees this class stores can be used to test if the entirety of the javac tree was visited.
| Constructor and Description |
|---|
ExpectedTreesVisitor() |
visitAnnotatedType, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitIdentifier, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberReference, visitMemberSelect, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitWildcardreduce, scan, scanpublic Set<Tree> getTrees()
public void defaultAction(Tree tree)
tree should have a corresponding JavaParser node.defaultAction in class TreeScannerWithDefaultstree - the tree to recordpublic Void visitAnnotation(AnnotationTree tree, Void p)
visitAnnotation in interface TreeVisitor<Void,Void>visitAnnotation in class TreeScannerWithDefaultspublic Void visitClass(ClassTree tree, Void p)
visitClass in interface TreeVisitor<Void,Void>visitClass in class TreeScannerWithDefaultspublic Void visitExpressionStatement(ExpressionStatementTree tree, Void p)
visitExpressionStatement in interface TreeVisitor<Void,Void>visitExpressionStatement in class TreeScannerWithDefaultspublic Void visitForLoop(ForLoopTree tree, Void p)
visitForLoop in interface TreeVisitor<Void,Void>visitForLoop in class TreeScannerWithDefaultspublic Void visitSwitch(SwitchTree tree, Void p)
visitSwitch in interface TreeVisitor<Void,Void>visitSwitch in class TreeScannerWithDefaultspublic Void visitSynchronized(SynchronizedTree tree, Void p)
visitSynchronized in interface TreeVisitor<Void,Void>visitSynchronized in class TreeScannerWithDefaultspublic Void visitIf(IfTree tree, Void p)
visitIf in interface TreeVisitor<Void,Void>visitIf in class TreeScannerWithDefaultspublic Void visitImport(ImportTree tree, Void p)
visitImport in interface TreeVisitor<Void,Void>visitImport in class TreeScannerWithDefaultspublic Void visitMethod(MethodTree tree, Void p)
visitMethod in interface TreeVisitor<Void,Void>visitMethod in class TreeScannerWithDefaultspublic Void visitMethodInvocation(MethodInvocationTree tree, Void p)
visitMethodInvocation in interface TreeVisitor<Void,Void>visitMethodInvocation in class TreeScannerWithDefaultspublic Void visitModifiers(ModifiersTree tree, Void p)
visitModifiers in interface TreeVisitor<Void,Void>visitModifiers in class TreeScannerWithDefaultspublic Void visitNewArray(NewArrayTree tree, Void p)
visitNewArray in interface TreeVisitor<Void,Void>visitNewArray in class TreeScannerWithDefaultspublic Void visitNewClass(NewClassTree tree, Void p)
visitNewClass in interface TreeVisitor<Void,Void>visitNewClass in class TreeScannerWithDefaultspublic Void visitLambdaExpression(LambdaExpressionTree tree, Void p)
visitLambdaExpression in interface TreeVisitor<Void,Void>visitLambdaExpression in class TreeScannerWithDefaultspublic Void visitWhileLoop(WhileLoopTree tree, Void p)
visitWhileLoop in interface TreeVisitor<Void,Void>visitWhileLoop in class TreeScannerWithDefaultspublic Void visitDoWhileLoop(DoWhileLoopTree tree, Void p)
visitDoWhileLoop in interface TreeVisitor<Void,Void>visitDoWhileLoop in class TreeScannerWithDefaultspublic Void visitVariable(VariableTree tree, Void p)
visitVariable in interface TreeVisitor<Void,Void>visitVariable in class TreeScannerWithDefaults