java.lang.Object
com.sun.source.util.SimpleTreeVisitor<R,P>
- Type Parameters:
R
- the return type of this visitor's methods. UseVoid
for visitors that do not need to return results.P
- the type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameter.
- All Implemented Interfaces:
TreeVisitor<R,
P>
SimpleTreeVisitor
relies on preview features of the Java platform:
SimpleTreeVisitor
refers to one or more reflective preview APIs:DefaultCaseLabelTree
,GuardedPatternTree
,ParenthesizedPatternTree
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A simple visitor for tree nodes.
- Since:
- 1.6
-
Field Summary
Modifier and TypeFieldDescriptionprotected final R
The default value, returned by thedefault action
. -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a visitor, with a DEFAULT_VALUE ofnull
.protected
SimpleTreeVisitor
(R defaultValue) Creates a visitor, with a specified DEFAULT_VALUE. -
Method Summary
Modifier and TypeMethodDescriptionprotected R
defaultAction
(Tree node, P p) The default action, used by all visit methods that are not overridden.final R
Invokes the appropriate visit method specific to the type of the node.final R
Invokes the appropriate visit method on each of a sequence of nodes.visitAnnotatedType
(AnnotatedTypeTree node, P p) Visits an AnnotatedTypeTree node.visitAnnotation
(AnnotationTree node, P p) Visits an AnnotatedTree node.visitArrayAccess
(ArrayAccessTree node, P p) Visits an ArrayAccessTree node.visitArrayType
(ArrayTypeTree node, P p) Visits an ArrayTypeTree node.visitAssert
(AssertTree node, P p) Visits an AssertTree node.visitAssignment
(AssignmentTree node, P p) Visits an AssignmentTree node.visitBinary
(BinaryTree node, P p) Visits a BinaryTree node.visitBindingPattern
(BindingPatternTree node, P p) Visits an BindingPattern node.visitBlock
(BlockTree node, P p) Visits a BlockTree node.visitBreak
(BreakTree node, P p) Visits a BreakTree node.Visits a CaseTree node.visitCatch
(CatchTree node, P p) Visits a CatchTree node.visitClass
(ClassTree node, P p) Visits a ClassTree node.visitCompilationUnit
(CompilationUnitTree node, P p) Visits a CompilationUnitTree node.Visits a CompoundAssignmentTree node.Visits a ConditionalExpressionTree node.visitContinue
(ContinueTree node, P p) Visits a ContinueTree node.Preview.Visits a DefaultCaseLabelTree node.visitDoWhileLoop
(DoWhileLoopTree node, P p) Visits a DoWhileTree node.visitEmptyStatement
(EmptyStatementTree node, P p) Visits an EmptyStatementTree node.visitEnhancedForLoop
(EnhancedForLoopTree node, P p) Visits an EnhancedForLoopTree node.visitErroneous
(ErroneousTree node, P p) Visits an ErroneousTree node.visitExports
(ExportsTree node, P p) Visits an ExportsTree node.Visits an ExpressionStatementTree node.visitForLoop
(ForLoopTree node, P p) Visits a ForLoopTree node.Preview.Visits a GuardPatternTree node.visitIdentifier
(IdentifierTree node, P p) Visits an IdentifierTree node.Visits an IfTree node.visitImport
(ImportTree node, P p) Visits an ImportTree node.visitInstanceOf
(InstanceOfTree node, P p) Visits an InstanceOfTree node.visitIntersectionType
(IntersectionTypeTree node, P p) Visits an IntersectionTypeTree node.visitLabeledStatement
(LabeledStatementTree node, P p) Visits a LabeledStatementTree node.visitLambdaExpression
(LambdaExpressionTree node, P p) Visits a LambdaExpressionTree node.visitLiteral
(LiteralTree node, P p) Visits a LiteralTree node.visitMemberReference
(MemberReferenceTree node, P p) Visits a MemberReferenceTree node.visitMemberSelect
(MemberSelectTree node, P p) Visits a MemberSelectTree node.visitMethod
(MethodTree node, P p) Visits a MethodTree node.visitMethodInvocation
(MethodInvocationTree node, P p) Visits a MethodInvocationTree node.visitModifiers
(ModifiersTree node, P p) Visits a ModifiersTree node.visitModule
(ModuleTree node, P p) Visits a ModuleTree node.visitNewArray
(NewArrayTree node, P p) Visits a NewArrayTree node.visitNewClass
(NewClassTree node, P p) Visits a NewClassTree node.visitOpens
(OpensTree node, P p) Visits an OpensTree node.visitOther
(Tree node, P p) Visits an unknown type of Tree node.visitPackage
(PackageTree node, P p) Visits a PackageTree node.visitParameterizedType
(ParameterizedTypeTree node, P p) Visits a ParameterizedTypeTree node.visitParenthesized
(ParenthesizedTree node, P p) Visits a ParenthesizedTree node.Preview.Visits a ParenthesizedPatternTree node.visitPrimitiveType
(PrimitiveTypeTree node, P p) Visits a PrimitiveTypeTree node.visitProvides
(ProvidesTree node, P p) Visits a ProvidesTree node.visitRequires
(RequiresTree node, P p) Visits a RequiresTree node.visitReturn
(ReturnTree node, P p) Visits a ReturnTree node.visitSwitch
(SwitchTree node, P p) Visits a SwitchTree node.visitSwitchExpression
(SwitchExpressionTree node, P p) Visits a SwitchExpressionTree node.visitSynchronized
(SynchronizedTree node, P p) Visits a SynchronizedTree node.visitThrow
(ThrowTree node, P p) Visits a ThrowTree node.Visits a TryTree node.visitTypeCast
(TypeCastTree node, P p) Visits a TypeCastTree node.visitTypeParameter
(TypeParameterTree node, P p) Visits a TypeParameterTree node.visitUnary
(UnaryTree node, P p) Visits a UnaryTree node.visitUnionType
(UnionTypeTree node, P p) Visits a UnionTypeTree node.Visits a UsesTree node.visitVariable
(VariableTree node, P p) Visits a VariableTree node.visitWhileLoop
(WhileLoopTree node, P p) Visits a WhileLoopTree node.visitWildcard
(WildcardTree node, P p) Visits a WildcardTypeTree node.visitYield
(YieldTree node, P p) Visits a YieldTree node.
-
Field Details
-
DEFAULT_VALUE
The default value, returned by thedefault action
.
-
-
Constructor Details
-
SimpleTreeVisitor
protected SimpleTreeVisitor()Creates a visitor, with a DEFAULT_VALUE ofnull
. -
SimpleTreeVisitor
Creates a visitor, with a specified DEFAULT_VALUE.- Parameters:
defaultValue
- the default value to be returned by the default action
-
-
Method Details
-
defaultAction
The default action, used by all visit methods that are not overridden.- Parameters:
node
- the node being visitedp
- the parameter value passed to the visit method- Returns:
- the result value to be returned from the visit method
-
visit
Invokes the appropriate visit method specific to the type of the node.- Parameters:
node
- the node on which to dispatchp
- a parameter to be passed to the appropriate visit method- Returns:
- the value returns from the appropriate visit method
-
visit
Invokes the appropriate visit method on each of a sequence of nodes.- Parameters:
nodes
- the nodes on which to dispatchp
- a parameter value to be passed to each appropriate visit method- Returns:
- the value return from the last of the visit methods, or null if none were called
-
visitCompilationUnit
Visits a CompilationUnitTree node.- Specified by:
visitCompilationUnit
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitPackage
Visits a PackageTree node.- Specified by:
visitPackage
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitImport
Visits an ImportTree node.- Specified by:
visitImport
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitClass
Visits a ClassTree node.- Specified by:
visitClass
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitMethod
Visits a MethodTree node.- Specified by:
visitMethod
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitVariable
Visits a VariableTree node.- Specified by:
visitVariable
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitEmptyStatement
Visits an EmptyStatementTree node.- Specified by:
visitEmptyStatement
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitBlock
Visits a BlockTree node.- Specified by:
visitBlock
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitDoWhileLoop
Visits a DoWhileTree node.- Specified by:
visitDoWhileLoop
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitWhileLoop
Visits a WhileLoopTree node.- Specified by:
visitWhileLoop
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitForLoop
Visits a ForLoopTree node.- Specified by:
visitForLoop
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitEnhancedForLoop
Visits an EnhancedForLoopTree node.- Specified by:
visitEnhancedForLoop
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLabeledStatement
Visits a LabeledStatementTree node.- Specified by:
visitLabeledStatement
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSwitch
Visits a SwitchTree node.- Specified by:
visitSwitch
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSwitchExpression
Visits a SwitchExpressionTree node.- Specified by:
visitSwitchExpression
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitCase
Visits a CaseTree node.- Specified by:
visitCase
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitSynchronized
Visits a SynchronizedTree node.- Specified by:
visitSynchronized
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitTry
Visits a TryTree node.- Specified by:
visitTry
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitCatch
Visits a CatchTree node.- Specified by:
visitCatch
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitConditionalExpression
Visits a ConditionalExpressionTree node.- Specified by:
visitConditionalExpression
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitIf
Visits an IfTree node.- Specified by:
visitIf
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitExpressionStatement
Visits an ExpressionStatementTree node.- Specified by:
visitExpressionStatement
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitBreak
Visits a BreakTree node.- Specified by:
visitBreak
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitContinue
Visits a ContinueTree node.- Specified by:
visitContinue
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitReturn
Visits a ReturnTree node.- Specified by:
visitReturn
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitThrow
Visits a ThrowTree node.- Specified by:
visitThrow
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAssert
Visits an AssertTree node.- Specified by:
visitAssert
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitMethodInvocation
Visits a MethodInvocationTree node.- Specified by:
visitMethodInvocation
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitNewClass
Visits a NewClassTree node.- Specified by:
visitNewClass
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitNewArray
Visits a NewArrayTree node.- Specified by:
visitNewArray
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLambdaExpression
Visits a LambdaExpressionTree node.- Specified by:
visitLambdaExpression
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitParenthesized
Visits a ParenthesizedTree node.- Specified by:
visitParenthesized
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAssignment
Visits an AssignmentTree node.- Specified by:
visitAssignment
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitCompoundAssignment
Visits a CompoundAssignmentTree node.- Specified by:
visitCompoundAssignment
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnary
Visits a UnaryTree node.- Specified by:
visitUnary
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitBinary
Visits a BinaryTree node.- Specified by:
visitBinary
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitTypeCast
Visits a TypeCastTree node.- Specified by:
visitTypeCast
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitInstanceOf
Visits an InstanceOfTree node.- Specified by:
visitInstanceOf
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitBindingPattern
Visits an BindingPattern node.- Specified by:
visitBindingPattern
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 14
-
visitDefaultCaseLabel
visitDefaultCaseLabel
is a reflective preview API of the Java platform.Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.Visits a DefaultCaseLabelTree node.- Specified by:
visitDefaultCaseLabel
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 17
-
visitArrayAccess
Visits an ArrayAccessTree node.- Specified by:
visitArrayAccess
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitMemberSelect
Visits a MemberSelectTree node.- Specified by:
visitMemberSelect
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitParenthesizedPattern
visitParenthesizedPattern
is a reflective preview API of the Java platform.Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.Visits a ParenthesizedPatternTree node.- Specified by:
visitParenthesizedPattern
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 17
-
visitGuardedPattern
visitGuardedPattern
is a reflective preview API of the Java platform.Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.Visits a GuardPatternTree node.- Specified by:
visitGuardedPattern
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
- Since:
- 17
-
visitMemberReference
Visits a MemberReferenceTree node.- Specified by:
visitMemberReference
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitIdentifier
Visits an IdentifierTree node.- Specified by:
visitIdentifier
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitLiteral
Visits a LiteralTree node.- Specified by:
visitLiteral
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitPrimitiveType
Visits a PrimitiveTypeTree node.- Specified by:
visitPrimitiveType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitArrayType
Visits an ArrayTypeTree node.- Specified by:
visitArrayType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitParameterizedType
Visits a ParameterizedTypeTree node.- Specified by:
visitParameterizedType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUnionType
Visits a UnionTypeTree node.- Specified by:
visitUnionType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitIntersectionType
Visits an IntersectionTypeTree node.- Specified by:
visitIntersectionType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitTypeParameter
Visits a TypeParameterTree node.- Specified by:
visitTypeParameter
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitWildcard
Visits a WildcardTypeTree node.- Specified by:
visitWildcard
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitModifiers
Visits a ModifiersTree node.- Specified by:
visitModifiers
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAnnotation
Visits an AnnotatedTree node.- Specified by:
visitAnnotation
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitAnnotatedType
Visits an AnnotatedTypeTree node.- Specified by:
visitAnnotatedType
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitModule
Visits a ModuleTree node.- Specified by:
visitModule
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitExports
Visits an ExportsTree node.- Specified by:
visitExports
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitOpens
Visits an OpensTree node.- Specified by:
visitOpens
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitProvides
Visits a ProvidesTree node.- Specified by:
visitProvides
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitRequires
Visits a RequiresTree node.- Specified by:
visitRequires
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitUses
Visits a UsesTree node.- Specified by:
visitUses
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitErroneous
Visits an ErroneousTree node.- Specified by:
visitErroneous
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitOther
Visits an unknown type of Tree node. This can occur if the language evolves and new kinds of nodes are added to theTree
hierarchy.- Specified by:
visitOther
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
visitYield
Visits a YieldTree node.- Specified by:
visitYield
in interfaceTreeVisitor<R,
P> - Implementation Requirements:
- This implementation calls
defaultAction
. - Parameters:
node
- the node being visitedp
- a parameter value- Returns:
- the result of
defaultAction
-
SimpleTreeVisitor
when preview features are enabled.