Class ASTVisitor
- java.lang.Object
-
- org.eclipse.jdt.core.dom.ASTVisitor
-
- Direct Known Subclasses:
org.eclipse.jdt.internal.corext.dom.GenericVisitor
public abstract class ASTVisitor extends Object
A visitor for abstract syntax trees.For each different concrete AST node type T there are a pair of methods:
public boolean visit(T node)- Visits the given node to perform some arbitrary operation. Iftrueis returned, the given node's child nodes will be visited next; however, iffalseis returned, the given node's child nodes will not be visited. The default implementation provided by this class does nothing and returnstrue(with the exception ofASTVisitor.visit(Javadoc)). Subclasses may reimplement this method as needed.public void endVisit(T node)- Visits the given node to perform some arbitrary operation. When used in the conventional way, this method is called after all of the given node's children have been visited (or immediately, ifvisitreturnedfalse). The default implementation provided by this class does nothing. Subclasses may reimplement this method as needed.
In addition, there are a pair of methods for visiting AST nodes in the abstract, regardless of node type:
public void preVisit(ASTNode node)- Visits the given node to perform some arbitrary operation. This method is invoked prior to the appropriate type-specificvisitmethod. The default implementation of this method does nothing. Subclasses may reimplement this method as needed.public void postVisit(ASTNode node)- Visits the given node to perform some arbitrary operation. This method is invoked after the appropriate type-specificendVisitmethod. The default implementation of this method does nothing. Subclasses may reimplement this method as needed.
For nodes with list-valued properties, the child nodes within the list are visited in order. For nodes with multiple properties, the child nodes are visited in the order that most closely corresponds to the lexical reading order of the source program. For instance, for a type declaration node, the child ordering is: name, superclass, superinterfaces, and body declarations.
While it is possible to modify the tree in the visitor, care is required to ensure that the consequences are as expected and desirable. During the course of an ordinary visit starting at a given node, every node in the subtree is visited exactly twice, first with
visitand then withendVisit. During a traversal of a stationary tree, each node is either behind (afterendVisit), ahead (beforevisit), or in progress (betweenvisitand the matchingendVisit). Changes to the "behind" region of the tree are of no consequence to the visit in progress. Changes to the "ahead" region will be taken in stride. Changes to the "in progress" portion are the more interesting cases. With a node, the various properties are arranged in a linear list, with a cursor that separates the properties that have been visited from the ones that are still to be visited (the cursor is between the elements, rather than on an element). The cursor moves from the head to the tail of this list, advancing to the next position just beforevisitif called for that child. After the child subtree has been completely visited, the visit moves on the child immediately after the cursor. Removing a child while it is being visited does not alter the course of the visit. But any children added at positions after the cursor are considered in the "ahead" portion and will be visited.Cases to watch out for:
- Moving a child node further down the list. This could result in the child subtree being visited multiple times; these visits are sequential.
- Moving a child node up into an ancestor. If the new home for the node is in the "ahead" portion, the subtree will be visited a second time; again, these visits are sequential.
- Moving a node down into a child. If the new home for the node is in the "ahead" portion, the subtree will be visited a second time; in this case, the visits will be nested. In some cases, this can lead to a stack overflow or out of memory condition.
Note that
LineCommentandBlockCommentnodes are not normally visited in an AST because they are not considered part of main structure of the AST. UseCompilationUnit.getCommentList()to find these additional comments nodes.- See Also:
ASTNode.accept(ASTVisitor)
-
-
Constructor Summary
Constructors Constructor Description ASTVisitor()Creates a new AST visitor instance.ASTVisitor(boolean visitDocTags)Creates a new AST visitor instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendVisit(AnnotationTypeDeclaration node)End of visit the given type-specific AST node.voidendVisit(AnnotationTypeMemberDeclaration node)End of visit the given type-specific AST node.voidendVisit(AnonymousClassDeclaration node)End of visit the given type-specific AST node.voidendVisit(ArrayAccess node)End of visit the given type-specific AST node.voidendVisit(ArrayCreation node)End of visit the given type-specific AST node.voidendVisit(ArrayInitializer node)End of visit the given type-specific AST node.voidendVisit(ArrayType node)End of visit the given type-specific AST node.voidendVisit(AssertStatement node)End of visit the given type-specific AST node.voidendVisit(Assignment node)End of visit the given type-specific AST node.voidendVisit(Block node)End of visit the given type-specific AST node.voidendVisit(BlockComment node)End of visit the given type-specific AST node.voidendVisit(BooleanLiteral node)End of visit the given type-specific AST node.voidendVisit(BreakStatement node)End of visit the given type-specific AST node.voidendVisit(CastExpression node)End of visit the given type-specific AST node.voidendVisit(CatchClause node)End of visit the given type-specific AST node.voidendVisit(CharacterLiteral node)End of visit the given type-specific AST node.voidendVisit(ClassInstanceCreation node)End of visit the given type-specific AST node.voidendVisit(CompilationUnit node)End of visit the given type-specific AST node.voidendVisit(ConditionalExpression node)End of visit the given type-specific AST node.voidendVisit(ConstructorInvocation node)End of visit the given type-specific AST node.voidendVisit(ContinueStatement node)End of visit the given type-specific AST node.voidendVisit(CreationReference node)End of visit the given type-specific AST node.voidendVisit(Dimension node)End of visit the given type-specific AST node.voidendVisit(DoStatement node)End of visit the given type-specific AST node.voidendVisit(EmptyStatement node)End of visit the given type-specific AST node.voidendVisit(EnhancedForStatement node)End of visit the given type-specific AST node.voidendVisit(EnumConstantDeclaration node)End of visit the given type-specific AST node.voidendVisit(EnumDeclaration node)End of visit the given type-specific AST node.voidendVisit(ExportsDirective node)End of visit the given type-specific AST node.voidendVisit(ExpressionMethodReference node)End of visit the given type-specific AST node.voidendVisit(ExpressionStatement node)End of visit the given type-specific AST node.voidendVisit(FieldAccess node)End of visit the given type-specific AST node.voidendVisit(FieldDeclaration node)End of visit the given type-specific AST node.voidendVisit(ForStatement node)End of visit the given type-specific AST node.voidendVisit(IfStatement node)End of visit the given type-specific AST node.voidendVisit(ImportDeclaration node)End of visit the given type-specific AST node.voidendVisit(InfixExpression node)End of visit the given type-specific AST node.voidendVisit(Initializer node)End of visit the given type-specific AST node.voidendVisit(InstanceofExpression node)End of visit the given type-specific AST node.voidendVisit(IntersectionType node)End of visit the given type-specific AST node.voidendVisit(Javadoc node)End of visit the given type-specific AST node.voidendVisit(LabeledStatement node)End of visit the given type-specific AST node.voidendVisit(LambdaExpression node)End of visit the given type-specific AST node.voidendVisit(LineComment node)End of visit the given type-specific AST node.voidendVisit(MarkerAnnotation node)End of visit the given type-specific AST node.voidendVisit(MemberRef node)End of visit the given type-specific AST node.voidendVisit(MemberValuePair node)End of visit the given type-specific AST node.voidendVisit(MethodDeclaration node)End of visit the given type-specific AST node.voidendVisit(MethodInvocation node)End of visit the given type-specific AST node.voidendVisit(MethodRef node)End of visit the given type-specific AST node.voidendVisit(MethodRefParameter node)End of visit the given type-specific AST node.voidendVisit(Modifier node)End of visit the given type-specific AST node.voidendVisit(ModuleDeclaration node)End of visit the given type-specific AST node.voidendVisit(ModuleModifier node)End of visit the given type-specific AST node.voidendVisit(NameQualifiedType node)End of visit the given type-specific AST node.voidendVisit(NormalAnnotation node)End of visit the given type-specific AST node.voidendVisit(NullLiteral node)End of visit the given type-specific AST node.voidendVisit(NumberLiteral node)End of visit the given type-specific AST node.voidendVisit(OpensDirective node)End of visit the given type-specific AST node.voidendVisit(PackageDeclaration node)End of visit the given type-specific AST node.voidendVisit(ParameterizedType node)End of visit the given type-specific AST node.voidendVisit(ParenthesizedExpression node)End of visit the given type-specific AST node.voidendVisit(PostfixExpression node)End of visit the given type-specific AST node.voidendVisit(PrefixExpression node)End of visit the given type-specific AST node.voidendVisit(PrimitiveType node)End of visit the given type-specific AST node.voidendVisit(ProvidesDirective node)End of visit the given type-specific AST node.voidendVisit(QualifiedName node)End of visit the given type-specific AST node.voidendVisit(QualifiedType node)End of visit the given type-specific AST node.voidendVisit(RecordDeclaration node)End of visit the given type-specific AST node.voidendVisit(RequiresDirective node)End of visit the given type-specific AST node.voidendVisit(ReturnStatement node)End of visit the given type-specific AST node.voidendVisit(SimpleName node)End of visit the given type-specific AST node.voidendVisit(SimpleType node)End of visit the given type-specific AST node.voidendVisit(SingleMemberAnnotation node)End of visit the given type-specific AST node.voidendVisit(SingleVariableDeclaration node)End of visit the given type-specific AST node.voidendVisit(StringLiteral node)End of visit the given type-specific AST node.voidendVisit(SuperConstructorInvocation node)End of visit the given type-specific AST node.voidendVisit(SuperFieldAccess node)End of visit the given type-specific AST node.voidendVisit(SuperMethodInvocation node)End of visit the given type-specific AST node.voidendVisit(SuperMethodReference node)End of visit the given type-specific AST node.voidendVisit(SwitchCase node)End of visit the given type-specific AST node.voidendVisit(SwitchExpression node)End of visit the given type-specific AST node.voidendVisit(SwitchStatement node)End of visit the given type-specific AST node.voidendVisit(SynchronizedStatement node)End of visit the given type-specific AST node.voidendVisit(TagElement node)End of visit the given type-specific AST node.voidendVisit(TextBlock node)End of visit the given type-specific AST node.voidendVisit(TextElement node)End of visit the given type-specific AST node.voidendVisit(ThisExpression node)End of visit the given type-specific AST node.voidendVisit(ThrowStatement node)End of visit the given type-specific AST node.voidendVisit(TryStatement node)End of visit the given type-specific AST node.voidendVisit(TypeDeclaration node)End of visit the given type-specific AST node.voidendVisit(TypeDeclarationStatement node)End of visit the given type-specific AST node.voidendVisit(TypeLiteral node)End of visit the given type-specific AST node.voidendVisit(TypeMethodReference node)End of visit the given type-specific AST node.voidendVisit(TypeParameter node)End of visit the given type-specific AST node.voidendVisit(UnionType node)End of visit the given type-specific AST node.voidendVisit(UsesDirective node)End of visit the given type-specific AST node.voidendVisit(VariableDeclarationExpression node)End of visit the given type-specific AST node.voidendVisit(VariableDeclarationFragment node)End of visit the given type-specific AST node.voidendVisit(VariableDeclarationStatement node)End of visit the given type-specific AST node.voidendVisit(WhileStatement node)End of visit the given type-specific AST node.voidendVisit(WildcardType node)End of visit the given type-specific AST node.voidendVisit(YieldStatement node)End of visit the given type-specific AST node.voidpostVisit(ASTNode node)Visits the given AST node following the type-specific visit (afterendVisit).voidpreVisit(ASTNode node)Visits the given AST node prior to the type-specific visit (beforevisit).booleanpreVisit2(ASTNode node)Visits the given AST node prior to the type-specific visit (beforevisit).booleanvisit(AnnotationTypeDeclaration node)Visits the given type-specific AST node.booleanvisit(AnnotationTypeMemberDeclaration node)Visits the given type-specific AST node.booleanvisit(AnonymousClassDeclaration node)Visits the given type-specific AST node.booleanvisit(ArrayAccess node)Visits the given type-specific AST node.booleanvisit(ArrayCreation node)Visits the given type-specific AST node.booleanvisit(ArrayInitializer node)Visits the given type-specific AST node.booleanvisit(ArrayType node)Visits the given type-specific AST node.booleanvisit(AssertStatement node)Visits the given type-specific AST node.booleanvisit(Assignment node)Visits the given type-specific AST node.booleanvisit(Block node)Visits the given type-specific AST node.booleanvisit(BlockComment node)Visits the given type-specific AST node.booleanvisit(BooleanLiteral node)Visits the given type-specific AST node.booleanvisit(BreakStatement node)Visits the given type-specific AST node.booleanvisit(CastExpression node)Visits the given type-specific AST node.booleanvisit(CatchClause node)Visits the given type-specific AST node.booleanvisit(CharacterLiteral node)Visits the given type-specific AST node.booleanvisit(ClassInstanceCreation node)Visits the given type-specific AST node.booleanvisit(CompilationUnit node)Visits the given type-specific AST node.booleanvisit(ConditionalExpression node)Visits the given type-specific AST node.booleanvisit(ConstructorInvocation node)Visits the given type-specific AST node.booleanvisit(ContinueStatement node)Visits the given type-specific AST node.booleanvisit(CreationReference node)Visits the given type-specific AST node.booleanvisit(Dimension node)Visits the given type-specific AST node.booleanvisit(DoStatement node)Visits the given type-specific AST node.booleanvisit(EmptyStatement node)Visits the given type-specific AST node.booleanvisit(EnhancedForStatement node)Visits the given type-specific AST node.booleanvisit(EnumConstantDeclaration node)Visits the given type-specific AST node.booleanvisit(EnumDeclaration node)Visits the given type-specific AST node.booleanvisit(ExportsDirective node)Visits the given type-specific AST node.booleanvisit(ExpressionMethodReference node)Visits the given type-specific AST node.booleanvisit(ExpressionStatement node)Visits the given type-specific AST node.booleanvisit(FieldAccess node)Visits the given type-specific AST node.booleanvisit(FieldDeclaration node)Visits the given type-specific AST node.booleanvisit(ForStatement node)Visits the given type-specific AST node.booleanvisit(IfStatement node)Visits the given type-specific AST node.booleanvisit(ImportDeclaration node)Visits the given type-specific AST node.booleanvisit(InfixExpression node)Visits the given type-specific AST node.booleanvisit(Initializer node)Visits the given type-specific AST node.booleanvisit(InstanceofExpression node)Visits the given type-specific AST node.booleanvisit(IntersectionType node)Visits the given type-specific AST node.booleanvisit(Javadoc node)Visits the given AST node.booleanvisit(LabeledStatement node)Visits the given type-specific AST node.booleanvisit(LambdaExpression node)Visits the given type-specific AST node.booleanvisit(LineComment node)Visits the given type-specific AST node.booleanvisit(MarkerAnnotation node)Visits the given type-specific AST node.booleanvisit(MemberRef node)Visits the given type-specific AST node.booleanvisit(MemberValuePair node)Visits the given type-specific AST node.booleanvisit(MethodDeclaration node)Visits the given type-specific AST node.booleanvisit(MethodInvocation node)Visits the given type-specific AST node.booleanvisit(MethodRef node)Visits the given type-specific AST node.booleanvisit(MethodRefParameter node)Visits the given type-specific AST node.booleanvisit(Modifier node)Visits the given type-specific AST node.booleanvisit(ModuleDeclaration node)Visits the given type-specific AST node.booleanvisit(ModuleModifier node)Visits the given type-specific AST node.booleanvisit(NameQualifiedType node)Visits the given type-specific AST node.booleanvisit(NormalAnnotation node)Visits the given type-specific AST node.booleanvisit(NullLiteral node)Visits the given type-specific AST node.booleanvisit(NumberLiteral node)Visits the given type-specific AST node.booleanvisit(OpensDirective node)Visits the given type-specific AST node.booleanvisit(PackageDeclaration node)Visits the given type-specific AST node.booleanvisit(ParameterizedType node)Visits the given type-specific AST node.booleanvisit(ParenthesizedExpression node)Visits the given type-specific AST node.booleanvisit(PostfixExpression node)Visits the given type-specific AST node.booleanvisit(PrefixExpression node)Visits the given type-specific AST node.booleanvisit(PrimitiveType node)Visits the given type-specific AST node.booleanvisit(ProvidesDirective node)Visits the given type-specific AST node.booleanvisit(QualifiedName node)Visits the given type-specific AST node.booleanvisit(QualifiedType node)Visits the given type-specific AST node.booleanvisit(RecordDeclaration node)Visits the given type-specific AST node.booleanvisit(RequiresDirective node)Visits the given type-specific AST node.booleanvisit(ReturnStatement node)Visits the given type-specific AST node.booleanvisit(SimpleName node)Visits the given type-specific AST node.booleanvisit(SimpleType node)Visits the given type-specific AST node.booleanvisit(SingleMemberAnnotation node)Visits the given type-specific AST node.booleanvisit(SingleVariableDeclaration node)Visits the given type-specific AST node.booleanvisit(StringLiteral node)Visits the given type-specific AST node.booleanvisit(SuperConstructorInvocation node)Visits the given type-specific AST node.booleanvisit(SuperFieldAccess node)Visits the given type-specific AST node.booleanvisit(SuperMethodInvocation node)Visits the given type-specific AST node.booleanvisit(SuperMethodReference node)Visits the given type-specific AST node.booleanvisit(SwitchCase node)Visits the given type-specific AST node.booleanvisit(SwitchExpression node)Visits the given type-specific AST node.booleanvisit(SwitchStatement node)Visits the given type-specific AST node.booleanvisit(SynchronizedStatement node)Visits the given type-specific AST node.booleanvisit(TagElement node)Visits the given type-specific AST node.booleanvisit(TextBlock node)Visits the given type-specific AST node.booleanvisit(TextElement node)Visits the given type-specific AST node.booleanvisit(ThisExpression node)Visits the given type-specific AST node.booleanvisit(ThrowStatement node)Visits the given type-specific AST node.booleanvisit(TryStatement node)Visits the given type-specific AST node.booleanvisit(TypeDeclaration node)Visits the given type-specific AST node.booleanvisit(TypeDeclarationStatement node)Visits the given type-specific AST node.booleanvisit(TypeLiteral node)Visits the given type-specific AST node.booleanvisit(TypeMethodReference node)Visits the given type-specific AST node.booleanvisit(TypeParameter node)Visits the given type-specific AST node.booleanvisit(UnionType node)Visits the given type-specific AST node.booleanvisit(UsesDirective node)Visits the given type-specific AST node.booleanvisit(VariableDeclarationExpression node)Visits the given type-specific AST node.booleanvisit(VariableDeclarationFragment node)Visits the given type-specific AST node.booleanvisit(VariableDeclarationStatement node)Visits the given type-specific AST node.booleanvisit(WhileStatement node)Visits the given type-specific AST node.booleanvisit(WildcardType node)Visits the given type-specific AST node.booleanvisit(YieldStatement node)Visits the given type-specific AST node.
-
-
-
Constructor Detail
-
ASTVisitor
public ASTVisitor()
Creates a new AST visitor instance.For backwards compatibility, the visitor does not visit tag elements below doc comments by default. Use
ASTVisitor(true)for an visitor that includes doc comments by default.
-
ASTVisitor
public ASTVisitor(boolean visitDocTags)
Creates a new AST visitor instance.- Parameters:
visitDocTags-trueif doc comment tags are to be visited by default, andfalseotherwise- Since:
- 3.0
- See Also:
Javadoc.tags(),visit(Javadoc)
-
-
Method Detail
-
preVisit
public void preVisit(ASTNode node)
Visits the given AST node prior to the type-specific visit (beforevisit).The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- See Also:
preVisit2(ASTNode)
-
preVisit2
public boolean preVisit2(ASTNode node)
Visits the given AST node prior to the type-specific visit (beforevisit).The default implementation calls
preVisit(ASTNode)and then returns true. Subclasses may reimplement.- Parameters:
node- the node to visit- Returns:
trueifvisit(node)should be called, andfalseotherwise.- Since:
- 3.5
- See Also:
preVisit(ASTNode)
-
postVisit
public void postVisit(ASTNode node)
Visits the given AST node following the type-specific visit (afterendVisit).The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
visit
public boolean visit(AnnotationTypeDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(AnnotationTypeMemberDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(AnonymousClassDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ArrayAccess node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ArrayCreation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ArrayInitializer node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ArrayType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(AssertStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(Assignment node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(Block node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(BlockComment node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
Note:
LineCommentandBlockCommentnodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(BooleanLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(BreakStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(CastExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(CatchClause node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(CharacterLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ClassInstanceCreation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(CompilationUnit node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ConditionalExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ConstructorInvocation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ContinueStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(CreationReference node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(Dimension node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(DoStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(EmptyStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(EnhancedForStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(EnumConstantDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(EnumDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(ExportsDirective node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(ExpressionMethodReference node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(ExpressionStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(FieldAccess node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(FieldDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ForStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(IfStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ImportDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(InfixExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(Initializer node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(InstanceofExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(IntersectionType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(Javadoc node)
Visits the given AST node.Unlike other node types, the boolean returned by the default implementation is controlled by a constructor-supplied parameter
ASTVisitor(boolean)which isfalseby default. Subclasses may reimplement.- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- See Also:
ASTVisitor(),ASTVisitor(boolean)
-
visit
public boolean visit(LabeledStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(LambdaExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(LineComment node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
Note:
LineCommentandBlockCommentnodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(MarkerAnnotation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(MemberRef node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(MemberValuePair node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(MethodRef node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(MethodRefParameter node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(MethodDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(MethodInvocation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(Modifier node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(ModuleDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(ModuleModifier node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(NameQualifiedType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(NormalAnnotation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(NullLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(NumberLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(OpensDirective node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(PackageDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ParameterizedType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(ParenthesizedExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(PostfixExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(PrefixExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ProvidesDirective node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(PrimitiveType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(QualifiedName node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(QualifiedType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(RequiresDirective node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(RecordDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.22
- Restriction:
- This method is not intended to be referenced by clients.
-
visit
public boolean visit(ReturnStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SimpleName node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SimpleType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SingleMemberAnnotation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(SingleVariableDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(StringLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SuperConstructorInvocation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SuperFieldAccess node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SuperMethodInvocation node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SuperMethodReference node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(SwitchCase node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SwitchExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.18
- Restriction:
- This method is not intended to be referenced by clients as it is a part of Java preview feature.
- Restriction:
- This method is not intended to be re-implemented or extended by clients as it is a part of Java preview feature.
-
visit
public boolean visit(SwitchStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(SynchronizedStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TagElement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(TextBlock node)
Visits the given type-specific AST node.The default implementation does nothing and returns true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.20
- Restriction:
- This method is not intended to be referenced by clients as it is a part of Java preview feature.
- Restriction:
- This method is not intended to be re-implemented or extended by clients as it is a part of Java preview feature.
-
visit
public boolean visit(TextElement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.0
-
visit
public boolean visit(ThisExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(ThrowStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TryStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TypeDeclaration node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TypeDeclarationStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TypeLiteral node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(TypeMethodReference node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.10
-
visit
public boolean visit(TypeParameter node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(UnionType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.7.1
-
visit
public boolean visit(UsesDirective node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may re-implement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.14
-
visit
public boolean visit(VariableDeclarationExpression node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(VariableDeclarationStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(VariableDeclarationFragment node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(WhileStatement node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped
-
visit
public boolean visit(WildcardType node)
Visits the given type-specific AST node.The default implementation does nothing and return true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.1
-
visit
public boolean visit(YieldStatement node)
Visits the given type-specific AST node.The default implementation does nothing and returns true. Subclasses may reimplement.
- Parameters:
node- the node to visit- Returns:
trueif the children of this node should be visited, andfalseif the children of this node should be skipped- Since:
- 3.20
- Restriction:
- This method is not intended to be referenced by clients as it is a part of Java preview feature.
- Restriction:
- This method is not intended to be re-implemented or extended by clients as it is a part of Java preview feature.
-
endVisit
public void endVisit(AnnotationTypeDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(AnnotationTypeMemberDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(AnonymousClassDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ArrayAccess node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ArrayCreation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ArrayInitializer node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ArrayType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(AssertStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Assignment node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Block node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(BlockComment node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
Note:
LineCommentandBlockCommentnodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(BooleanLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(BreakStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(CastExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(CatchClause node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(CharacterLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ClassInstanceCreation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(CompilationUnit node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ConditionalExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ConstructorInvocation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ContinueStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(CreationReference node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(DoStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(EmptyStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(EnhancedForStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(EnumConstantDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(EnumDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(ExportsDirective node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(ExpressionMethodReference node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(ExpressionStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Dimension node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(FieldAccess node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(FieldDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ForStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(IfStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ImportDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(InfixExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(InstanceofExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Initializer node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Javadoc node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(LabeledStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(LambdaExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(LineComment node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
Note:
LineCommentandBlockCommentnodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(MarkerAnnotation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(MemberRef node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(MemberValuePair node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(MethodRef node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(MethodRefParameter node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(MethodDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(MethodInvocation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(Modifier node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(ModuleDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(ModuleModifier node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(NameQualifiedType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(NormalAnnotation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(NullLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(NumberLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(OpensDirective node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(PackageDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ParameterizedType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(ParenthesizedExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(PostfixExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(PrefixExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(PrimitiveType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ProvidesDirective node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(QualifiedName node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(QualifiedType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(RequiresDirective node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(RecordDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may re implement.
- Parameters:
node- the node to visit- Since:
- 3.22
- Restriction:
- This method is not intended to be referenced by clients.
-
endVisit
public void endVisit(ReturnStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SimpleName node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SimpleType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SingleMemberAnnotation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(SingleVariableDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(StringLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SuperConstructorInvocation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SuperFieldAccess node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SuperMethodInvocation node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SuperMethodReference node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(SwitchCase node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SwitchExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.18
-
endVisit
public void endVisit(SwitchStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(SynchronizedStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TagElement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(TextBlock node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.20
- Restriction:
- This method is not intended to be referenced by clients as it is a part of Java preview feature.
- Restriction:
- This method is not intended to be re-implemented or extended by clients as it is a part of Java preview feature.
-
endVisit
public void endVisit(TextElement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.0
-
endVisit
public void endVisit(ThisExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(ThrowStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TryStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TypeDeclaration node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TypeDeclarationStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TypeLiteral node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(TypeMethodReference node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(TypeParameter node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(UnionType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.7.1
-
endVisit
public void endVisit(UsesDirective node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.14
-
endVisit
public void endVisit(IntersectionType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.10
-
endVisit
public void endVisit(VariableDeclarationExpression node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(VariableDeclarationStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(VariableDeclarationFragment node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(WhileStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit
-
endVisit
public void endVisit(WildcardType node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.1
-
endVisit
public void endVisit(YieldStatement node)
End of visit the given type-specific AST node.The default implementation does nothing. Subclasses may reimplement.
- Parameters:
node- the node to visit- Since:
- 3.20
- Restriction:
- This method is not intended to be referenced by clients as it is a part of Java preview feature.
- Restriction:
- This method is not intended to be re-implemented or extended by clients as it is a part of Java preview feature.
-
-