X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/dom/ASTVisitor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/dom/ASTVisitor.java new file mode 100644 index 0000000..217262b --- /dev/null +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/dom/ASTVisitor.java @@ -0,0 +1,2573 @@ +/******************************************************************************* + * Copyright (c) 2000, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +package net.sourceforge.phpdt.core.dom; + +/** + * A visitor for abstract syntax trees. + *

+ * For each different concrete AST node type T there are + * a pair of methods: + *

+ *

+ * In addition, there are a pair of methods for visiting AST nodes in the + * abstract, regardless of node type: + * + *

+ * 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 visit and + * then with endVisit. During a traversal of a stationary tree, + * each node is either behind (after endVisit), ahead (before + * visit), or in progress (between visit and + * the matching endVisit). 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 + * before visit if 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: + *

+ *

Note that {@link LineComment} and {@link BlockComment} nodes are + * not normally visited in an AST because they are not considered + * part of main structure of the AST. Use + * {@link CompilationUnit#getCommentList()} to find these additional + * comments nodes. + *

+ * + * @see org.eclipse.jdt.core.dom.ASTNode#accept(ASTVisitor) + */ +public abstract class ASTVisitor { + + /** + * Indicates whether doc tags should be visited by default. + * @since 3.0 + */ + private boolean visitDocTags; + + /** + * Creates a new AST visitor instance. + *

+ * For backwards compatibility, the visitor does not visit tag + * elements below doc comments by default. Use + * {@link #ASTVisitor(boolean) ASTVisitor(true)} + * for an visitor that includes doc comments by default. + *

+ */ + public ASTVisitor() { + this(false); + } + + /** + * Creates a new AST visitor instance. + * + * @param visitDocTags true if doc comment tags are + * to be visited by default, and false otherwise + * @see Javadoc#tags() + * @see #visit(Javadoc) + * @since 3.0 + */ + public ASTVisitor(boolean visitDocTags) { + this.visitDocTags = visitDocTags; + } + + /** + * Visits the given AST node prior to the type-specific visit. + * (before visit). + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void preVisit(ASTNode node) { + // default implementation: do nothing + } + + /** + * Visits the given AST node following the type-specific visit + * (after endVisit). + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void postVisit(ASTNode node) { + // default implementation: do nothing + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(AnnotationTypeDeclaration node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(AnnotationTypeMemberDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(AnonymousClassDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ArrayAccess node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ArrayCreation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ArrayInitializer node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ArrayType node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(AssertStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(Assignment node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(Block node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ *

Note: {@link LineComment} and {@link BlockComment} nodes 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. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(BlockComment node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(BooleanLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(BreakStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(CastExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(CatchClause node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(CharacterLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ClassInstanceCreation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(CompilationUnit node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ConditionalExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ConstructorInvocation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ContinueStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(DoStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(EmptyStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(EnhancedForStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(EnumConstantDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(EnumDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ExpressionStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(FieldAccess node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(FieldDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ForStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(IfStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ImportDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(InfixExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(InstanceofExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(Initializer node) { + return true; + } + + /** + * Visits the given AST node. + *

+ * Unlike other node types, the boolean returned by the default + * implementation is controlled by a constructor-supplied + * parameter {@link #ASTVisitor(boolean) ASTVisitor(boolean)} + * which is false by default. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @see #ASTVisitor() + * @see #ASTVisitor(boolean) + */ + public boolean visit(Javadoc node) { + // visit tag elements inside doc comments only if requested + return this.visitDocTags; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(LabeledStatement node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ *

Note: {@link LineComment} and {@link BlockComment} nodes 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. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(LineComment node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(MarkerAnnotation node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(MemberRef node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(MemberValuePair node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(MethodRef node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(MethodRefParameter node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(MethodDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(MethodInvocation node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(Modifier node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(NormalAnnotation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(NullLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(NumberLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(PackageDeclaration node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(ParameterizedType node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ParenthesizedExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(PostfixExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(PrefixExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(PrimitiveType node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(QualifiedName node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(QualifiedType node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ReturnStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SimpleName node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SimpleType node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(SingleMemberAnnotation node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SingleVariableDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(StringLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SuperConstructorInvocation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SuperFieldAccess node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SuperMethodInvocation node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SwitchCase node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SwitchStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(SynchronizedStatement node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(TagElement node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.0 + */ + public boolean visit(TextElement node) { + return true; + } + + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ThisExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(ThrowStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(TryStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(TypeDeclaration node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(TypeDeclarationStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(TypeLiteral node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(TypeParameter node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(VariableDeclarationExpression node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(VariableDeclarationStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(VariableDeclarationFragment node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + */ + public boolean visit(WhileStatement node) { + return true; + } + + /** + * Visits the given type-specific AST node. + *

+ * The default implementation does nothing and return true. + * Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @return true if the children of this node should be + * visited, and false if the children of this node should + * be skipped + * @since 3.1 + */ + public boolean visit(WildcardType node) { + return true; + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(AnnotationTypeDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(AnnotationTypeMemberDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(AnonymousClassDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ArrayAccess node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ArrayCreation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ArrayInitializer node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ArrayType node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(AssertStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(Assignment node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(Block node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ *

Note: {@link LineComment} and {@link BlockComment} nodes 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. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(BlockComment node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(BooleanLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(BreakStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(CastExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(CatchClause node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(CharacterLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ClassInstanceCreation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(CompilationUnit node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ConditionalExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ConstructorInvocation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ContinueStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(DoStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(EmptyStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(EnhancedForStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(EnumConstantDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(EnumDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ExpressionStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(FieldAccess node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(FieldDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ForStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(IfStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ImportDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(InfixExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(InstanceofExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(Initializer node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(Javadoc node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(LabeledStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ *

Note: {@link LineComment} and {@link BlockComment} nodes 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. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(LineComment node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(MarkerAnnotation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(MemberRef node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(MemberValuePair node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(MethodRef node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(MethodRefParameter node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(MethodDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(MethodInvocation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(Modifier node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(NormalAnnotation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(NullLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(NumberLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(PackageDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(ParameterizedType node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ParenthesizedExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(PostfixExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(PrefixExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(PrimitiveType node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(QualifiedName node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(QualifiedType node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ReturnStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SimpleName node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SimpleType node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(SingleMemberAnnotation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SingleVariableDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(StringLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SuperConstructorInvocation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SuperFieldAccess node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SuperMethodInvocation node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SwitchCase node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SwitchStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(SynchronizedStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(TagElement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.0 + */ + public void endVisit(TextElement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ThisExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(ThrowStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(TryStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(TypeDeclaration node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(TypeDeclarationStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(TypeLiteral node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(TypeParameter node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(VariableDeclarationExpression node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(VariableDeclarationStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(VariableDeclarationFragment node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + */ + public void endVisit(WhileStatement node) { + // default implementation: do nothing + } + + /** + * End of visit the given type-specific AST node. + *

+ * The default implementation does nothing. Subclasses may reimplement. + *

+ * + * @param node the node to visit + * @since 3.1 + */ + public void endVisit(WildcardType node) { + // default implementation: do nothing + } +}