R
- the return type of this visitor's methods. Use Void
for visitors that do not need to return results.P
- the type of the additional parameter to this visitor's
methods. Use Void
for visitors that do not need an
additional parameter.SimpleTreeVisitorES5_1
, SimpleTreeVisitorES6
public interface TreeVisitor<R,P>
accept
method, the visitXYZ method most applicable
to that tree is invoked.
Classes implementing this interface may or may not throw a
NullPointerException
if the additional parameter p
is null
; see documentation of the implementing class for
details.
WARNING: It is possible that methods will be added to this interface to accommodate new, currently unknown, language structures added to future versions of the ECMAScript programming language. When new visit methods are added for new Tree subtypes, default method bodies will be introduced which will call visitUnknown method as a fallback.
Modifier and Type | Method | Description |
---|---|---|
R |
visitArrayAccess(ArrayAccessTree node,
P p) |
Visit array access expression tree.
|
R |
visitArrayLiteral(ArrayLiteralTree node,
P p) |
Visit array literal expression tree.
|
R |
visitAssignment(AssignmentTree node,
P p) |
Visit assignment tree.
|
R |
visitBinary(BinaryTree node,
P p) |
Visit binary expression tree.
|
R |
visitBlock(BlockTree node,
P p) |
Visit block statement tree.
|
R |
visitBreak(BreakTree node,
P p) |
Visit break statement tree.
|
R |
visitCase(CaseTree node,
P p) |
Visit case statement tree.
|
R |
visitCatch(CatchTree node,
P p) |
Visit catch block statement tree.
|
R |
visitClassDeclaration(ClassDeclarationTree node,
P p) |
Visit class statement tree.
|
R |
visitClassExpression(ClassExpressionTree node,
P p) |
Visit class expression tree.
|
R |
visitCompilationUnit(CompilationUnitTree node,
P p) |
Visit compilation unit tree.
|
R |
visitCompoundAssignment(CompoundAssignmentTree node,
P p) |
Visit compound assignment tree.
|
R |
visitConditionalExpression(ConditionalExpressionTree node,
P p) |
Visit conditional expression tree.
|
R |
visitContinue(ContinueTree node,
P p) |
Visit continue statement tree.
|
R |
visitDebugger(DebuggerTree node,
P p) |
Visit debugger statement tree.
|
R |
visitDoWhileLoop(DoWhileLoopTree node,
P p) |
Visit do-while statement tree.
|
R |
visitEmptyStatement(EmptyStatementTree node,
P p) |
Visit an empty statement tree.
|
R |
visitErroneous(ErroneousTree node,
P p) |
Visit error expression tree.
|
R |
visitExportEntry(ExportEntryTree node,
P p) |
Visit Module ExportEntry tree.
|
R |
visitExpressionStatement(ExpressionStatementTree node,
P p) |
Visit expression statement tree.
|
R |
visitForInLoop(ForInLoopTree node,
P p) |
Visit for..in statement tree.
|
R |
visitForLoop(ForLoopTree node,
P p) |
Visit 'for' statement tree.
|
R |
visitForOfLoop(ForOfLoopTree node,
P p) |
Visit for..of statement tree.
|
R |
visitFunctionCall(FunctionCallTree node,
P p) |
Visit function call expression tree.
|
R |
visitFunctionDeclaration(FunctionDeclarationTree node,
P p) |
Visit function declaration tree.
|
R |
visitFunctionExpression(FunctionExpressionTree node,
P p) |
Visit function expression tree.
|
R |
visitIdentifier(IdentifierTree node,
P p) |
Visit identifier tree.
|
R |
visitIf(IfTree node,
P p) |
Visit 'if' statement tree.
|
R |
visitImportEntry(ImportEntryTree node,
P p) |
Visit Module ImportEntry tree.
|
R |
visitInstanceOf(InstanceOfTree node,
P p) |
Visit 'instanceof' expression tree.
|
R |
visitLabeledStatement(LabeledStatementTree node,
P p) |
Visit labeled statement tree.
|
R |
visitLiteral(LiteralTree node,
P p) |
Visit literal expression tree.
|
R |
visitMemberSelect(MemberSelectTree node,
P p) |
Visit member select expression tree.
|
R |
visitModule(ModuleTree node,
P p) |
Visit Module tree.
|
R |
visitNew(NewTree node,
P p) |
Visit 'new' expression tree.
|
R |
visitObjectLiteral(ObjectLiteralTree node,
P p) |
Visit object literal tree.
|
R |
visitParenthesized(ParenthesizedTree node,
P p) |
Visit parenthesized expression tree.
|
R |
visitProperty(PropertyTree node,
P p) |
Visit a property of an object literal expression tree.
|
R |
visitRegExpLiteral(RegExpLiteralTree node,
P p) |
Visit regular expression literal tree.
|
R |
visitReturn(ReturnTree node,
P p) |
Visit return statement tree.
|
R |
visitSpread(SpreadTree node,
P p) |
Visit 'spread' expression tree.
|
R |
visitSwitch(SwitchTree node,
P p) |
Visit 'switch' statement tree.
|
R |
visitTemplateLiteral(TemplateLiteralTree node,
P p) |
Visit template literal tree.
|
R |
visitThrow(ThrowTree node,
P p) |
Visit 'throw' expression tree.
|
R |
visitTry(TryTree node,
P p) |
Visit 'try' statement tree.
|
R |
visitUnary(UnaryTree node,
P p) |
Visit unary expression tree.
|
R |
visitUnknown(Tree node,
P p) |
Visit unknown expression/statement tree.
|
R |
visitVariable(VariableTree node,
P p) |
Visit variable declaration tree.
|
R |
visitWhileLoop(WhileLoopTree node,
P p) |
Visit 'while' statement tree.
|
R |
visitWith(WithTree node,
P p) |
Visit 'with' statement tree.
|
R |
visitYield(YieldTree node,
P p) |
Visit 'yield' expression tree.
|
R visitAssignment(AssignmentTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitCompoundAssignment(CompoundAssignmentTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitBinary(BinaryTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitBlock(BlockTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitBreak(BreakTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitCase(CaseTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitCatch(CatchTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitClassDeclaration(ClassDeclarationTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitClassExpression(ClassExpressionTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitConditionalExpression(ConditionalExpressionTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitContinue(ContinueTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitDebugger(DebuggerTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitDoWhileLoop(DoWhileLoopTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitErroneous(ErroneousTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitExpressionStatement(ExpressionStatementTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitForLoop(ForLoopTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitForInLoop(ForInLoopTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitForOfLoop(ForOfLoopTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitFunctionCall(FunctionCallTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitFunctionDeclaration(FunctionDeclarationTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitFunctionExpression(FunctionExpressionTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitIdentifier(IdentifierTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitIf(IfTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitArrayAccess(ArrayAccessTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitArrayLiteral(ArrayLiteralTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitLabeledStatement(LabeledStatementTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitLiteral(LiteralTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitParenthesized(ParenthesizedTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitReturn(ReturnTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitMemberSelect(MemberSelectTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitNew(NewTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitObjectLiteral(ObjectLiteralTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitProperty(PropertyTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitRegExpLiteral(RegExpLiteralTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitTemplateLiteral(TemplateLiteralTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitEmptyStatement(EmptyStatementTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitSpread(SpreadTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitSwitch(SwitchTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitThrow(ThrowTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitCompilationUnit(CompilationUnitTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitModule(ModuleTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitExportEntry(ExportEntryTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitImportEntry(ImportEntryTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitTry(TryTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitInstanceOf(InstanceOfTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitUnary(UnaryTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitVariable(VariableTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitWhileLoop(WhileLoopTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitWith(WithTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitYield(YieldTree node, P p)
node
- node being visitedp
- extra parameter passed to the visitorR visitUnknown(Tree node, P p)
node
- node being visitedp
- extra parameter passed to the visitor Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2014, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b158-1