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.@Exported
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 Java™ programming language. Therefore, visitor classes directly implementing this interface may be source incompatible with future versions of the platform.
R visitMethodInvocation(FunctionCallTree node, P p)
R visitAssignment(AssignmentTree node, P p)
R visitCompoundAssignment(CompoundAssignmentTree node, P p)
R visitBinary(BinaryTree node, P p)
R visitConditionalExpression(ConditionalExpressionTree node, P p)
R visitContinue(ContinueTree node, P p)
R visitDebugger(DebuggerTree node, P p)
R visitDoWhileLoop(DoWhileLoopTree node, P p)
R visitErroneous(ErroneousTree node, P p)
R visitExpressionStatement(ExpressionStatementTree node, P p)
R visitEnhancedForLoop(ForInLoopTree node, P p)
R visitForLoop(ForLoopTree node, P p)
R visitForInLoop(ForInLoopTree node, P p)
R visitFunctionCall(FunctionCallTree node, P p)
R visitFunctionDeclaration(FunctionDeclarationTree node, P p)
R visitFunctionExpression(FunctionExpressionTree node, P p)
R visitIdentifier(IdentifierTree node, P p)
R visitArrayAccess(ArrayAccessTree node, P p)
R visitArrayLiteral(ArrayLiteralTree node, P p)
R visitLabeledStatement(LabeledStatementTree node, P p)
R visitLiteral(LiteralTree node, P p)
R visitMethod(FunctionDeclarationTree node, P p)
R visitParenthesized(ParenthesizedTree node, P p)
R visitReturn(ReturnTree node, P p)
R visitMemberSelect(MemberSelectTree node, P p)
R visitObjectLiteral(ObjectLiteralTree node, P p)
R visitProperty(PropertyTree node, P p)
R visitRegExpLiteral(RegExpLiteralTree node, P p)
R visitEmptyStatement(EmptyStatementTree node, P p)
R visitSwitch(SwitchTree node, P p)
R visitCompilationUnit(CompilationUnitTree node, P p)
R visitInstanceOf(InstanceOfTree node, P p)
R visitVariable(VariableTree node, P p)
R visitWhileLoop(WhileLoopTree node, P p)