APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.source.util

public Class SimpleTreeVisitor<R, P>

extends Object
implements TreeVisitor<R, P>
Class Inheritance
All Implemented Interfaces
com.sun.source.tree.TreeVisitor
Known Direct Subclasses
com.sun.tools.javac.comp.Attr.IdentAttributer
Type Parameters
<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.
Imports
com.sun.source.tree.*

A simple visitor for tree nodes.
Author
Peter von der Ahé
Since
1.6

Field Summary

Modifier and TypeField and Description
protected final R
DEFAULT_VALUE

The default value, returned by the default action.

Constructor Summary

AccessConstructor and Description
protected
SimpleTreeVisitor()

Creates a visitor, with a DEFAULT_VALUE of null.

protected
SimpleTreeVisitor(R
the default value to be returned by the default action
defaultValue
)

Creates a visitor, with a specified DEFAULT_VALUE.

Method Summary

Modifier and TypeMethod and Description
protected R

Returns:

the result value to be returned from the visit method
defaultAction
(Tree
the node being visited
node
,
P
the parameter value passed to the visit method
p
)

The default action, used by all visit methods that are not overridden.

public final R

Returns:

the value returns from the appropriate visit method
visit
(Tree
the node on which to dispatch
node
,
P
a parameter to be passed to the appropriate visit method
p
)

Invokes the appropriate visit method specific to the type of the node.

public final R

Returns:

the value return from the last of the visit methods, or null if none were called
visit
(Iterable<? extends Tree>
the nodes on which to dispatch
nodes
,
P
a parameter value to be passed to each appropriate visit method
p
)

Invokes the appropriate visit method on each of a sequence of nodes.

public R

Returns:

the result of defaultAction
visitAnnotatedType
(AnnotatedTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitAnnotatedType.

Visits an AnnotatedTypeTree node.

public R

Returns:

the result of defaultAction
visitAnnotation
(AnnotationTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitAnnotation.

Visits an AnnotatedTree node.

public R

Returns:

the result of defaultAction
visitAnyPattern
(AnyPatternTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitAnyPattern.

Visits a AnyPatternTree node.

public R

Returns:

the result of defaultAction
visitArrayAccess
(ArrayAccessTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitArrayAccess.

Visits an ArrayAccessTree node.

public R

Returns:

the result of defaultAction
visitArrayType
(ArrayTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitArrayType.

Visits an ArrayTypeTree node.

public R

Returns:

the result of defaultAction
visitAssert
(AssertTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitAssert.

Visits an AssertTree node.

public R

Returns:

the result of defaultAction
visitAssignment
(AssignmentTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitAssignment.

Visits an AssignmentTree node.

public R

Returns:

the result of defaultAction
visitBinary
(BinaryTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitBinary.

Visits a BinaryTree node.

public R

Returns:

the result of defaultAction
visitBindingPattern
(BindingPatternTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitBindingPattern.

Visits a BindingPatternTree node.

public R

Returns:

the result of defaultAction
visitBlock
(BlockTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitBlock.

Visits a BlockTree node.

public R

Returns:

the result of defaultAction
visitBreak
(BreakTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitBreak.

Visits a BreakTree node.

public R

Returns:

the result of defaultAction
visitCase
(CaseTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitCase.

Visits a CaseTree node.

public R

Returns:

the result of defaultAction
visitCatch
(CatchTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitCatch.

Visits a CatchTree node.

public R

Returns:

the result of defaultAction
visitClass
(ClassTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitClass.

Visits a ClassTree node.

public R

Returns:

the result of defaultAction
visitCompilationUnit
(CompilationUnitTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitCompilationUnit.

Visits a CompilationUnitTree node.

public R

Returns:

the result of defaultAction
visitCompoundAssignment
(CompoundAssignmentTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitCompoundAssignment.

Visits a CompoundAssignmentTree node.

public R

Returns:

the result of defaultAction
visitConditionalExpression
(ConditionalExpressionTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitConditionalExpression.

Visits a ConditionalExpressionTree node.

public R

Returns:

the result of defaultAction
visitConstantCaseLabel
(ConstantCaseLabelTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitConstantCaseLabel.

Visits a ConstantCaseLabelTree node.

public R

Returns:

the result of defaultAction
visitContinue
(ContinueTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitContinue.

Visits a ContinueTree node.

public R

Returns:

the result of defaultAction
visitDeconstructionPattern
(DeconstructionPatternTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitDeconstructionPattern.

Visits a DeconstructionPatternTree node.

public R

Returns:

the result of defaultAction
visitDefaultCaseLabel
(DefaultCaseLabelTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitDefaultCaseLabel.

Visits a DefaultCaseLabelTree node.

public R

Returns:

the result of defaultAction
visitDoWhileLoop
(DoWhileLoopTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitDoWhileLoop.

Visits a DoWhileTree node.

public R

Returns:

the result of defaultAction
visitEmptyStatement
(EmptyStatementTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitEmptyStatement.

Visits an EmptyStatementTree node.

public R

Returns:

the result of defaultAction
visitEnhancedForLoop
(EnhancedForLoopTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitEnhancedForLoop.

Visits an EnhancedForLoopTree node.

public R

Returns:

the result of defaultAction
visitErroneous
(ErroneousTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitErroneous.

Visits an ErroneousTree node.

public R

Returns:

the result of defaultAction
visitExports
(ExportsTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitExports.

Visits an ExportsTree node.

public R

Returns:

the result of defaultAction
visitExpressionStatement
(ExpressionStatementTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitExpressionStatement.

Visits an ExpressionStatementTree node.

public R

Returns:

the result of defaultAction
visitForLoop
(ForLoopTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitForLoop.

Visits a ForLoopTree node.

public R

Returns:

the result of defaultAction
visitIdentifier
(IdentifierTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitIdentifier.

Visits an IdentifierTree node.

public R

Returns:

the result of defaultAction
visitIf
(IfTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitIf.

Visits an IfTree node.

public R

Returns:

the result of defaultAction
visitImport
(ImportTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitImport.

Visits an ImportTree node.

public R

Returns:

the result of defaultAction
visitInstanceOf
(InstanceOfTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitInstanceOf.

Visits an InstanceOfTree node.

public R

Returns:

the result of defaultAction
visitIntersectionType
(IntersectionTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitIntersectionType.

Visits an IntersectionTypeTree node.

public R

Returns:

the result of defaultAction
visitLabeledStatement
(LabeledStatementTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitLabeledStatement.

Visits a LabeledStatementTree node.

public R

Returns:

the result of defaultAction
visitLambdaExpression
(LambdaExpressionTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitLambdaExpression.

Visits a LambdaExpressionTree node.

public R

Returns:

the result of defaultAction
visitLiteral
(LiteralTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitLiteral.

Visits a LiteralTree node.

public R

Returns:

the result of defaultAction
visitMemberReference
(MemberReferenceTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitMemberReference.

Visits a MemberReferenceTree node.

public R

Returns:

the result of defaultAction
visitMemberSelect
(MemberSelectTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitMemberSelect.

Visits a MemberSelectTree node.

public R

Returns:

the result of defaultAction
visitMethod
(MethodTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitMethod.

Visits a MethodTree node.

public R

Returns:

the result of defaultAction
visitMethodInvocation
(MethodInvocationTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitMethodInvocation.

Visits a MethodInvocationTree node.

public R

Returns:

the result of defaultAction
visitModifiers
(ModifiersTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitModifiers.

Visits a ModifiersTree node.

public R

Returns:

the result of defaultAction
visitModule
(ModuleTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitModule.

Visits a ModuleTree node.

public R

Returns:

the result of defaultAction
visitNewArray
(NewArrayTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitNewArray.

Visits a NewArrayTree node.

public R

Returns:

the result of defaultAction
visitNewClass
(NewClassTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitNewClass.

Visits a NewClassTree node.

public R

Returns:

the result of defaultAction
visitOpens
(OpensTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitOpens.

Visits an OpensTree node.

public R

Returns:

the result of defaultAction
visitOther
(Tree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitOther.

Visits an unknown type of Tree node.

public R

Returns:

the result of defaultAction
visitPackage
(PackageTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitPackage.

Visits a PackageTree node.

public R

Returns:

the result of defaultAction
visitParameterizedType
(ParameterizedTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitParameterizedType.

Visits a ParameterizedTypeTree node.

public R

Returns:

the result of defaultAction
visitParenthesized
(ParenthesizedTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitParenthesized.

Visits a ParenthesizedTree node.

public R

Returns:

the result of defaultAction
visitPatternCaseLabel
(PatternCaseLabelTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitPatternCaseLabel.

Visits a PatternCaseLabelTree node.

public R

Returns:

the result of defaultAction
visitPrimitiveType
(PrimitiveTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitPrimitiveType.

Visits a PrimitiveTypeTree node.

public R

Returns:

the result of defaultAction
visitProvides
(ProvidesTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitProvides.

Visits a ProvidesTree node.

public R

Returns:

the result of defaultAction
visitRequires
(RequiresTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitRequires.

Visits a RequiresTree node.

public R

Returns:

the result of defaultAction
visitReturn
(ReturnTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitReturn.

Visits a ReturnTree node.

public R

Returns:

the result of defaultAction
visitSwitch
(SwitchTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitSwitch.

Visits a SwitchTree node.

public R

Returns:

the result of defaultAction
visitSwitchExpression
(SwitchExpressionTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitSwitchExpression.

Visits a SwitchExpressionTree node.

public R

Returns:

the result of defaultAction
visitSynchronized
(SynchronizedTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitSynchronized.

Visits a SynchronizedTree node.

public R

Returns:

the result of defaultAction
visitThrow
(ThrowTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitThrow.

Visits a ThrowTree node.

public R

Returns:

the result of defaultAction
visitTry
(TryTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitTry.

Visits a TryTree node.

public R

Returns:

the result of defaultAction
visitTypeCast
(TypeCastTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitTypeCast.

Visits a TypeCastTree node.

public R

Returns:

the result of defaultAction
visitTypeParameter
(TypeParameterTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitTypeParameter.

Visits a TypeParameterTree node.

public R

Returns:

the result of defaultAction
visitUnary
(UnaryTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitUnary.

Visits a UnaryTree node.

public R

Returns:

the result of defaultAction
visitUnionType
(UnionTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitUnionType.

Visits a UnionTypeTree node.

public R

Returns:

the result of defaultAction
visitUses
(UsesTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitUses.

Visits a UsesTree node.

public R

Returns:

the result of defaultAction
visitVariable
(VariableTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitVariable.

Visits a VariableTree node.

public R

Returns:

the result of defaultAction
visitVarType
(VarTypeTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitVarType.

Visits a VarTypeTree node.

public R

Returns:

the result of defaultAction
visitWhileLoop
(WhileLoopTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitWhileLoop.

Visits a WhileLoopTree node.

public R

Returns:

the result of defaultAction
visitWildcard
(WildcardTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitWildcard.

Visits a WildcardTypeTree node.

public R

Returns:

the result of defaultAction
visitYield
(YieldTree node, P p)

Implements com.sun.source.tree.TreeVisitor.visitYield.

Visits a YieldTree node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait