1 /*******************************************************************************
2 * Copyright (c) 2000, 2007 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.core.dom;
15 * A visitor for abstract syntax trees.
17 * For each different concrete AST node type <i>T</i> there are
20 * <li><code>public boolean visit(<i>T</i> node)</code> - Visits
21 * the given node to perform some arbitrary operation. If <code>true</code>
22 * is returned, the given node's child nodes will be visited next; however,
23 * if <code>false</code> is returned, the given node's child nodes will
24 * not be visited. The default implementation provided by this class does
25 * nothing and returns <code>true</code> (with the exception of
26 * {@link #visit(Javadoc) ASTVisitor.visit(Javadoc)}).
27 * Subclasses may reimplement this method as needed.</li>
28 * <li><code>public void endVisit(<i>T</i> node)</code> - Visits
29 * the given node to perform some arbitrary operation. When used in the
30 * conventional way, this method is called after all of the given node's
31 * children have been visited (or immediately, if <code>visit</code> returned
32 * <code>false</code>). The default implementation provided by this class does
33 * nothing. Subclasses may reimplement this method as needed.</li>
36 * In addition, there are a pair of methods for visiting AST nodes in the
37 * abstract, regardless of node type:
39 * <li><code>public void preVisit(ASTNode node)</code> - Visits
40 * the given node to perform some arbitrary operation.
41 * This method is invoked prior to the appropriate type-specific
42 * <code>visit</code> method.
43 * The default implementation of this method does nothing.
44 * Subclasses may reimplement this method as needed.</li>
45 * <li><code>public void postVisit(ASTNode node)</code> - Visits
46 * the given node to perform some arbitrary operation.
47 * This method is invoked after the appropriate type-specific
48 * <code>endVisit</code> method.
49 * The default implementation of this method does nothing.
50 * Subclasses may reimplement this method as needed.</li>
53 * For nodes with list-valued properties, the child nodes within the list
54 * are visited in order. For nodes with multiple properties, the child nodes
55 * are visited in the order that most closely corresponds to the lexical
56 * reading order of the source program. For instance, for a type declaration
57 * node, the child ordering is: name, superclass, superinterfaces, and
61 * While it is possible to modify the tree in the visitor, care is required to
62 * ensure that the consequences are as expected and desirable.
63 * During the course of an ordinary visit starting at a given node, every node
64 * in the subtree is visited exactly twice, first with <code>visit</code> and
65 * then with <code>endVisit</code>. During a traversal of a stationary tree,
66 * each node is either behind (after <code>endVisit</code>), ahead (before
67 * <code>visit</code>), or in progress (between <code>visit</code> and
68 * the matching <code>endVisit</code>). Changes to the "behind" region of the
69 * tree are of no consequence to the visit in progress. Changes to the "ahead"
70 * region will be taken in stride. Changes to the "in progress" portion are
71 * the more interesting cases. With a node, the various properties are arranged
72 * in a linear list, with a cursor that separates the properties that have
73 * been visited from the ones that are still to be visited (the cursor
74 * is between the elements, rather than on an element). The cursor moves from
75 * the head to the tail of this list, advancing to the next position just
76 * <i>before</i> <code>visit</code> if called for that child. After the child
77 * subtree has been completely visited, the visit moves on the child
78 * immediately after the cursor. Removing a child while it is being visited
79 * does not alter the course of the visit. But any children added at positions
80 * after the cursor are considered in the "ahead" portion and will be visited.
83 * Cases to watch out for:
85 * <li>Moving a child node further down the list. This could result in the
86 * child subtree being visited multiple times; these visits are sequential.</li>
87 * <li>Moving a child node up into an ancestor. If the new home for
88 * the node is in the "ahead" portion, the subtree will be visited
89 * a second time; again, these visits are sequential.</li>
90 * <li>Moving a node down into a child. If the new home for
91 * the node is in the "ahead" portion, the subtree will be visited
92 * a second time; in this case, the visits will be nested. In some cases,
93 * this can lead to a stack overflow or out of memory condition.</li>
95 * <p>Note that {@link LineComment} and {@link BlockComment} nodes are
96 * not normally visited in an AST because they are not considered
97 * part of main structure of the AST. Use
98 * {@link CompilationUnit#getCommentList()} to find these additional
102 * @see org.eclipse.jdt.core.dom.ASTNode#accept(ASTVisitor)
104 public abstract class ASTVisitor {
107 * Indicates whether doc tags should be visited by default.
110 private boolean visitDocTags;
113 * Creates a new AST visitor instance.
115 * For backwards compatibility, the visitor does not visit tag
116 * elements below doc comments by default. Use
117 * {@link #ASTVisitor(boolean) ASTVisitor(true)}
118 * for an visitor that includes doc comments by default.
121 public ASTVisitor() {
126 * Creates a new AST visitor instance.
128 * @param visitDocTags <code>true</code> if doc comment tags are
129 * to be visited by default, and <code>false</code> otherwise
130 * @see Javadoc#tags()
131 * @see #visit(Javadoc)
134 public ASTVisitor(boolean visitDocTags) {
135 this.visitDocTags = visitDocTags;
139 * Visits the given AST node prior to the type-specific visit.
140 * (before <code>visit</code>).
142 * The default implementation does nothing. Subclasses may reimplement.
145 * @param node the node to visit
147 public void preVisit(ASTNode node) {
148 // default implementation: do nothing
152 * Visits the given AST node following the type-specific visit
153 * (after <code>endVisit</code>).
155 * The default implementation does nothing. Subclasses may reimplement.
158 * @param node the node to visit
160 public void postVisit(ASTNode node) {
161 // default implementation: do nothing
166 * Visits the given type-specific AST node.
168 * The default implementation does nothing and return true.
169 * Subclasses may reimplement.
172 * @param node the node to visit
173 * @return <code>true</code> if the children of this node should be
174 * visited, and <code>false</code> if the children of this node should
178 public boolean visit(AnnotationTypeDeclaration node) {
184 * Visits the given type-specific AST node.
186 * The default implementation does nothing and return true.
187 * Subclasses may reimplement.
190 * @param node the node to visit
191 * @return <code>true</code> if the children of this node should be
192 * visited, and <code>false</code> if the children of this node should
196 public boolean visit(AnnotationTypeMemberDeclaration node) {
201 * Visits the given type-specific AST node.
203 * The default implementation does nothing and return true.
204 * Subclasses may reimplement.
207 * @param node the node to visit
208 * @return <code>true</code> if the children of this node should be
209 * visited, and <code>false</code> if the children of this node should
212 public boolean visit(AnonymousClassDeclaration node) {
217 * Visits the given type-specific AST node.
219 * The default implementation does nothing and return true.
220 * Subclasses may reimplement.
223 * @param node the node to visit
224 * @return <code>true</code> if the children of this node should be
225 * visited, and <code>false</code> if the children of this node should
228 public boolean visit(ArrayAccess node) {
233 * Visits the given type-specific AST node.
235 * The default implementation does nothing and return true.
236 * Subclasses may reimplement.
239 * @param node the node to visit
240 * @return <code>true</code> if the children of this node should be
241 * visited, and <code>false</code> if the children of this node should
244 public boolean visit(ArrayCreation node) {
249 * Visits the given type-specific AST node.
251 * The default implementation does nothing and return true.
252 * Subclasses may reimplement.
255 * @param node the node to visit
256 * @return <code>true</code> if the children of this node should be
257 * visited, and <code>false</code> if the children of this node should
260 public boolean visit(ArrayInitializer node) {
265 * Visits the given type-specific AST node.
267 * The default implementation does nothing and return true.
268 * Subclasses may reimplement.
271 * @param node the node to visit
272 * @return <code>true</code> if the children of this node should be
273 * visited, and <code>false</code> if the children of this node should
276 public boolean visit(ArrayType node) {
281 * Visits the given type-specific AST node.
283 * The default implementation does nothing and return true.
284 * Subclasses may reimplement.
287 * @param node the node to visit
288 * @return <code>true</code> if the children of this node should be
289 * visited, and <code>false</code> if the children of this node should
292 public boolean visit(AssertStatement node) {
297 * Visits the given type-specific AST node.
299 * The default implementation does nothing and return true.
300 * Subclasses may reimplement.
303 * @param node the node to visit
304 * @return <code>true</code> if the children of this node should be
305 * visited, and <code>false</code> if the children of this node should
308 public boolean visit(Assignment node) {
313 * Visits the given type-specific AST node.
315 * The default implementation does nothing and return true.
316 * Subclasses may reimplement.
319 * @param node the node to visit
320 * @return <code>true</code> if the children of this node should be
321 * visited, and <code>false</code> if the children of this node should
324 public boolean visit(Block node) {
330 * Visits the given type-specific AST node.
332 * The default implementation does nothing and return true.
333 * Subclasses may reimplement.
335 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
336 * not considered part of main structure of the AST. This method will
337 * only be called if a client goes out of their way to visit this
338 * kind of node explicitly.
341 * @param node the node to visit
342 * @return <code>true</code> if the children of this node should be
343 * visited, and <code>false</code> if the children of this node should
347 public boolean visit(BlockComment node) {
352 * Visits the given type-specific AST node.
354 * The default implementation does nothing and return true.
355 * Subclasses may reimplement.
358 * @param node the node to visit
359 * @return <code>true</code> if the children of this node should be
360 * visited, and <code>false</code> if the children of this node should
363 public boolean visit(BooleanLiteral node) {
368 * Visits the given type-specific AST node.
370 * The default implementation does nothing and return true.
371 * Subclasses may reimplement.
374 * @param node the node to visit
375 * @return <code>true</code> if the children of this node should be
376 * visited, and <code>false</code> if the children of this node should
379 public boolean visit(BreakStatement node) {
384 * Visits the given type-specific AST node.
386 * The default implementation does nothing and return true.
387 * Subclasses may reimplement.
390 * @param node the node to visit
391 * @return <code>true</code> if the children of this node should be
392 * visited, and <code>false</code> if the children of this node should
395 public boolean visit(CastExpression node) {
400 * Visits the given type-specific AST node.
402 * The default implementation does nothing and return true.
403 * Subclasses may reimplement.
406 * @param node the node to visit
407 * @return <code>true</code> if the children of this node should be
408 * visited, and <code>false</code> if the children of this node should
411 public boolean visit(CatchClause node) {
416 * Visits the given type-specific AST node.
418 * The default implementation does nothing and return true.
419 * Subclasses may reimplement.
422 * @param node the node to visit
423 * @return <code>true</code> if the children of this node should be
424 * visited, and <code>false</code> if the children of this node should
427 public boolean visit(CharacterLiteral node) {
432 * Visits the given type-specific AST node.
434 * The default implementation does nothing and return true.
435 * Subclasses may reimplement.
438 * @param node the node to visit
439 * @return <code>true</code> if the children of this node should be
440 * visited, and <code>false</code> if the children of this node should
443 public boolean visit(ClassInstanceCreation node) {
448 * Visits the given type-specific AST node.
450 * The default implementation does nothing and return true.
451 * Subclasses may reimplement.
454 * @param node the node to visit
455 * @return <code>true</code> if the children of this node should be
456 * visited, and <code>false</code> if the children of this node should
459 public boolean visit(CompilationUnit node) {
464 * Visits the given type-specific AST node.
466 * The default implementation does nothing and return true.
467 * Subclasses may reimplement.
470 * @param node the node to visit
471 * @return <code>true</code> if the children of this node should be
472 * visited, and <code>false</code> if the children of this node should
475 public boolean visit(ConditionalExpression node) {
480 * Visits the given type-specific AST node.
482 * The default implementation does nothing and return true.
483 * Subclasses may reimplement.
486 * @param node the node to visit
487 * @return <code>true</code> if the children of this node should be
488 * visited, and <code>false</code> if the children of this node should
491 public boolean visit(ConstructorInvocation node) {
496 * Visits the given type-specific AST node.
498 * The default implementation does nothing and return true.
499 * Subclasses may reimplement.
502 * @param node the node to visit
503 * @return <code>true</code> if the children of this node should be
504 * visited, and <code>false</code> if the children of this node should
507 public boolean visit(ContinueStatement node) {
512 * Visits the given type-specific AST node.
514 * The default implementation does nothing and return true.
515 * Subclasses may reimplement.
518 * @param node the node to visit
519 * @return <code>true</code> if the children of this node should be
520 * visited, and <code>false</code> if the children of this node should
523 public boolean visit(DoStatement node) {
528 * Visits the given type-specific AST node.
530 * The default implementation does nothing and return true.
531 * Subclasses may reimplement.
534 * @param node the node to visit
535 * @return <code>true</code> if the children of this node should be
536 * visited, and <code>false</code> if the children of this node should
539 public boolean visit(EmptyStatement node) {
544 * Visits the given type-specific AST node.
546 * The default implementation does nothing and return true.
547 * Subclasses may reimplement.
550 * @param node the node to visit
551 * @return <code>true</code> if the children of this node should be
552 * visited, and <code>false</code> if the children of this node should
556 public boolean visit(EnhancedForStatement node) {
561 * Visits the given type-specific AST node.
563 * The default implementation does nothing and return true.
564 * Subclasses may reimplement.
567 * @param node the node to visit
568 * @return <code>true</code> if the children of this node should be
569 * visited, and <code>false</code> if the children of this node should
573 public boolean visit(EnumConstantDeclaration node) {
578 * Visits the given type-specific AST node.
580 * The default implementation does nothing and return true.
581 * Subclasses may reimplement.
584 * @param node the node to visit
585 * @return <code>true</code> if the children of this node should be
586 * visited, and <code>false</code> if the children of this node should
590 public boolean visit(EnumDeclaration node) {
595 * Visits the given type-specific AST node.
597 * The default implementation does nothing and return true.
598 * Subclasses may reimplement.
601 * @param node the node to visit
602 * @return <code>true</code> if the children of this node should be
603 * visited, and <code>false</code> if the children of this node should
606 public boolean visit(ExpressionStatement node) {
611 * Visits the given type-specific AST node.
613 * The default implementation does nothing and return true.
614 * Subclasses may reimplement.
617 * @param node the node to visit
618 * @return <code>true</code> if the children of this node should be
619 * visited, and <code>false</code> if the children of this node should
622 public boolean visit(FieldAccess node) {
627 * Visits the given type-specific AST node.
629 * The default implementation does nothing and return true.
630 * Subclasses may reimplement.
633 * @param node the node to visit
634 * @return <code>true</code> if the children of this node should be
635 * visited, and <code>false</code> if the children of this node should
638 public boolean visit(FieldDeclaration node) {
643 * Visits the given type-specific AST node.
645 * The default implementation does nothing and return true.
646 * Subclasses may reimplement.
649 * @param node the node to visit
650 * @return <code>true</code> if the children of this node should be
651 * visited, and <code>false</code> if the children of this node should
654 public boolean visit(ForStatement node) {
659 * Visits the given type-specific AST node.
661 * The default implementation does nothing and return true.
662 * Subclasses may reimplement.
665 * @param node the node to visit
666 * @return <code>true</code> if the children of this node should be
667 * visited, and <code>false</code> if the children of this node should
670 public boolean visit(IfStatement node) {
675 * Visits the given type-specific AST node.
677 * The default implementation does nothing and return true.
678 * Subclasses may reimplement.
681 * @param node the node to visit
682 * @return <code>true</code> if the children of this node should be
683 * visited, and <code>false</code> if the children of this node should
686 public boolean visit(ImportDeclaration node) {
691 * Visits the given type-specific AST node.
693 * The default implementation does nothing and return true.
694 * Subclasses may reimplement.
697 * @param node the node to visit
698 * @return <code>true</code> if the children of this node should be
699 * visited, and <code>false</code> if the children of this node should
702 public boolean visit(InfixExpression node) {
707 * Visits the given type-specific AST node.
709 * The default implementation does nothing and return true.
710 * Subclasses may reimplement.
713 * @param node the node to visit
714 * @return <code>true</code> if the children of this node should be
715 * visited, and <code>false</code> if the children of this node should
718 public boolean visit(InstanceofExpression node) {
723 * Visits the given type-specific AST node.
725 * The default implementation does nothing and return true.
726 * Subclasses may reimplement.
729 * @param node the node to visit
730 * @return <code>true</code> if the children of this node should be
731 * visited, and <code>false</code> if the children of this node should
734 public boolean visit(Initializer node) {
739 * Visits the given AST node.
741 * Unlike other node types, the boolean returned by the default
742 * implementation is controlled by a constructor-supplied
743 * parameter {@link #ASTVisitor(boolean) ASTVisitor(boolean)}
744 * which is <code>false</code> by default.
745 * Subclasses may reimplement.
748 * @param node the node to visit
749 * @return <code>true</code> if the children of this node should be
750 * visited, and <code>false</code> if the children of this node should
753 * @see #ASTVisitor(boolean)
755 public boolean visit(Javadoc node) {
756 // visit tag elements inside doc comments only if requested
757 return this.visitDocTags;
761 * Visits the given type-specific AST node.
763 * The default implementation does nothing and return true.
764 * Subclasses may reimplement.
767 * @param node the node to visit
768 * @return <code>true</code> if the children of this node should be
769 * visited, and <code>false</code> if the children of this node should
772 public boolean visit(LabeledStatement node) {
778 * Visits the given type-specific AST node.
780 * The default implementation does nothing and return true.
781 * Subclasses may reimplement.
783 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
784 * not considered part of main structure of the AST. This method will
785 * only be called if a client goes out of their way to visit this
786 * kind of node explicitly.
789 * @param node the node to visit
790 * @return <code>true</code> if the children of this node should be
791 * visited, and <code>false</code> if the children of this node should
795 public boolean visit(LineComment node) {
801 * Visits the given type-specific AST node.
803 * The default implementation does nothing and return true.
804 * Subclasses may reimplement.
807 * @param node the node to visit
808 * @return <code>true</code> if the children of this node should be
809 * visited, and <code>false</code> if the children of this node should
813 public boolean visit(MarkerAnnotation node) {
819 * Visits the given type-specific AST node.
821 * The default implementation does nothing and return true.
822 * Subclasses may reimplement.
825 * @param node the node to visit
826 * @return <code>true</code> if the children of this node should be
827 * visited, and <code>false</code> if the children of this node should
831 public boolean visit(MemberRef node) {
837 * Visits the given type-specific AST node.
839 * The default implementation does nothing and return true.
840 * Subclasses may reimplement.
843 * @param node the node to visit
844 * @return <code>true</code> if the children of this node should be
845 * visited, and <code>false</code> if the children of this node should
849 public boolean visit(MemberValuePair node) {
855 * Visits the given type-specific AST node.
857 * The default implementation does nothing and return true.
858 * Subclasses may reimplement.
861 * @param node the node to visit
862 * @return <code>true</code> if the children of this node should be
863 * visited, and <code>false</code> if the children of this node should
867 public boolean visit(MethodRef node) {
873 * Visits the given type-specific AST node.
875 * The default implementation does nothing and return true.
876 * Subclasses may reimplement.
879 * @param node the node to visit
880 * @return <code>true</code> if the children of this node should be
881 * visited, and <code>false</code> if the children of this node should
885 public boolean visit(MethodRefParameter node) {
891 * Visits the given type-specific AST node.
893 * The default implementation does nothing and return true.
894 * Subclasses may reimplement.
897 * @param node the node to visit
898 * @return <code>true</code> if the children of this node should be
899 * visited, and <code>false</code> if the children of this node should
902 public boolean visit(MethodDeclaration node) {
907 * Visits the given type-specific AST node.
909 * The default implementation does nothing and return true.
910 * Subclasses may reimplement.
913 * @param node the node to visit
914 * @return <code>true</code> if the children of this node should be
915 * visited, and <code>false</code> if the children of this node should
918 public boolean visit(MethodInvocation node) {
924 * Visits the given type-specific AST node.
926 * The default implementation does nothing and return true.
927 * Subclasses may reimplement.
930 * @param node the node to visit
931 * @return <code>true</code> if the children of this node should be
932 * visited, and <code>false</code> if the children of this node should
936 public boolean visit(Modifier node) {
942 * Visits the given type-specific AST node.
944 * The default implementation does nothing and return true.
945 * Subclasses may reimplement.
948 * @param node the node to visit
949 * @return <code>true</code> if the children of this node should be
950 * visited, and <code>false</code> if the children of this node should
954 public boolean visit(NormalAnnotation node) {
959 * Visits the given type-specific AST node.
961 * The default implementation does nothing and return true.
962 * Subclasses may reimplement.
965 * @param node the node to visit
966 * @return <code>true</code> if the children of this node should be
967 * visited, and <code>false</code> if the children of this node should
970 public boolean visit(NullLiteral node) {
975 * Visits the given type-specific AST node.
977 * The default implementation does nothing and return true.
978 * Subclasses may reimplement.
981 * @param node the node to visit
982 * @return <code>true</code> if the children of this node should be
983 * visited, and <code>false</code> if the children of this node should
986 public boolean visit(NumberLiteral node) {
991 * Visits the given type-specific AST node.
993 * The default implementation does nothing and return true.
994 * Subclasses may reimplement.
997 * @param node the node to visit
998 * @return <code>true</code> if the children of this node should be
999 * visited, and <code>false</code> if the children of this node should
1002 public boolean visit(PackageDeclaration node) {
1008 * Visits the given type-specific AST node.
1010 * The default implementation does nothing and return true.
1011 * Subclasses may reimplement.
1014 * @param node the node to visit
1015 * @return <code>true</code> if the children of this node should be
1016 * visited, and <code>false</code> if the children of this node should
1020 public boolean visit(ParameterizedType node) {
1025 * Visits the given type-specific AST node.
1027 * The default implementation does nothing and return true.
1028 * Subclasses may reimplement.
1031 * @param node the node to visit
1032 * @return <code>true</code> if the children of this node should be
1033 * visited, and <code>false</code> if the children of this node should
1036 public boolean visit(ParenthesizedExpression node) {
1041 * Visits the given type-specific AST node.
1043 * The default implementation does nothing and return true.
1044 * Subclasses may reimplement.
1047 * @param node the node to visit
1048 * @return <code>true</code> if the children of this node should be
1049 * visited, and <code>false</code> if the children of this node should
1052 public boolean visit(PostfixExpression node) {
1057 * Visits the given type-specific AST node.
1059 * The default implementation does nothing and return true.
1060 * Subclasses may reimplement.
1063 * @param node the node to visit
1064 * @return <code>true</code> if the children of this node should be
1065 * visited, and <code>false</code> if the children of this node should
1068 public boolean visit(PrefixExpression node) {
1073 * Visits the given type-specific AST node.
1075 * The default implementation does nothing and return true.
1076 * Subclasses may reimplement.
1079 * @param node the node to visit
1080 * @return <code>true</code> if the children of this node should be
1081 * visited, and <code>false</code> if the children of this node should
1084 public boolean visit(PrimitiveType node) {
1089 * Visits the given type-specific AST node.
1091 * The default implementation does nothing and return true.
1092 * Subclasses may reimplement.
1095 * @param node the node to visit
1096 * @return <code>true</code> if the children of this node should be
1097 * visited, and <code>false</code> if the children of this node should
1100 public boolean visit(QualifiedName node) {
1105 * Visits the given type-specific AST node.
1107 * The default implementation does nothing and return true.
1108 * Subclasses may reimplement.
1111 * @param node the node to visit
1112 * @return <code>true</code> if the children of this node should be
1113 * visited, and <code>false</code> if the children of this node should
1117 public boolean visit(QualifiedType node) {
1122 * Visits the given type-specific AST node.
1124 * The default implementation does nothing and return true.
1125 * Subclasses may reimplement.
1128 * @param node the node to visit
1129 * @return <code>true</code> if the children of this node should be
1130 * visited, and <code>false</code> if the children of this node should
1133 public boolean visit(ReturnStatement node) {
1138 * Visits the given type-specific AST node.
1140 * The default implementation does nothing and return true.
1141 * Subclasses may reimplement.
1144 * @param node the node to visit
1145 * @return <code>true</code> if the children of this node should be
1146 * visited, and <code>false</code> if the children of this node should
1149 public boolean visit(SimpleName node) {
1154 * Visits the given type-specific AST node.
1156 * The default implementation does nothing and return true.
1157 * Subclasses may reimplement.
1160 * @param node the node to visit
1161 * @return <code>true</code> if the children of this node should be
1162 * visited, and <code>false</code> if the children of this node should
1165 public boolean visit(SimpleType node) {
1171 * Visits the given type-specific AST node.
1173 * The default implementation does nothing and return true.
1174 * Subclasses may reimplement.
1177 * @param node the node to visit
1178 * @return <code>true</code> if the children of this node should be
1179 * visited, and <code>false</code> if the children of this node should
1183 public boolean visit(SingleMemberAnnotation node) {
1189 * Visits the given type-specific AST node.
1191 * The default implementation does nothing and return true.
1192 * Subclasses may reimplement.
1195 * @param node the node to visit
1196 * @return <code>true</code> if the children of this node should be
1197 * visited, and <code>false</code> if the children of this node should
1200 public boolean visit(SingleVariableDeclaration node) {
1205 * Visits the given type-specific AST node.
1207 * The default implementation does nothing and return true.
1208 * Subclasses may reimplement.
1211 * @param node the node to visit
1212 * @return <code>true</code> if the children of this node should be
1213 * visited, and <code>false</code> if the children of this node should
1216 public boolean visit(StringLiteral node) {
1221 * Visits the given type-specific AST node.
1223 * The default implementation does nothing and return true.
1224 * Subclasses may reimplement.
1227 * @param node the node to visit
1228 * @return <code>true</code> if the children of this node should be
1229 * visited, and <code>false</code> if the children of this node should
1232 public boolean visit(SuperConstructorInvocation node) {
1237 * Visits the given type-specific AST node.
1239 * The default implementation does nothing and return true.
1240 * Subclasses may reimplement.
1243 * @param node the node to visit
1244 * @return <code>true</code> if the children of this node should be
1245 * visited, and <code>false</code> if the children of this node should
1248 public boolean visit(SuperFieldAccess node) {
1253 * Visits the given type-specific AST node.
1255 * The default implementation does nothing and return true.
1256 * Subclasses may reimplement.
1259 * @param node the node to visit
1260 * @return <code>true</code> if the children of this node should be
1261 * visited, and <code>false</code> if the children of this node should
1264 public boolean visit(SuperMethodInvocation node) {
1269 * Visits the given type-specific AST node.
1271 * The default implementation does nothing and return true.
1272 * Subclasses may reimplement.
1275 * @param node the node to visit
1276 * @return <code>true</code> if the children of this node should be
1277 * visited, and <code>false</code> if the children of this node should
1280 public boolean visit(SwitchCase node) {
1285 * Visits the given type-specific AST node.
1287 * The default implementation does nothing and return true.
1288 * Subclasses may reimplement.
1291 * @param node the node to visit
1292 * @return <code>true</code> if the children of this node should be
1293 * visited, and <code>false</code> if the children of this node should
1296 public boolean visit(SwitchStatement node) {
1301 * Visits the given type-specific AST node.
1303 * The default implementation does nothing and return true.
1304 * Subclasses may reimplement.
1307 * @param node the node to visit
1308 * @return <code>true</code> if the children of this node should be
1309 * visited, and <code>false</code> if the children of this node should
1312 public boolean visit(SynchronizedStatement node) {
1318 * Visits the given type-specific AST node.
1320 * The default implementation does nothing and return true.
1321 * Subclasses may reimplement.
1324 * @param node the node to visit
1325 * @return <code>true</code> if the children of this node should be
1326 * visited, and <code>false</code> if the children of this node should
1330 public boolean visit(TagElement node) {
1336 * Visits the given type-specific AST node.
1338 * The default implementation does nothing and return true.
1339 * Subclasses may reimplement.
1342 * @param node the node to visit
1343 * @return <code>true</code> if the children of this node should be
1344 * visited, and <code>false</code> if the children of this node should
1348 public boolean visit(TextElement node) {
1354 * Visits the given type-specific AST node.
1356 * The default implementation does nothing and return true.
1357 * Subclasses may reimplement.
1360 * @param node the node to visit
1361 * @return <code>true</code> if the children of this node should be
1362 * visited, and <code>false</code> if the children of this node should
1365 public boolean visit(ThisExpression node) {
1370 * Visits the given type-specific AST node.
1372 * The default implementation does nothing and return true.
1373 * Subclasses may reimplement.
1376 * @param node the node to visit
1377 * @return <code>true</code> if the children of this node should be
1378 * visited, and <code>false</code> if the children of this node should
1381 public boolean visit(ThrowStatement node) {
1386 * Visits the given type-specific AST node.
1388 * The default implementation does nothing and return true.
1389 * Subclasses may reimplement.
1392 * @param node the node to visit
1393 * @return <code>true</code> if the children of this node should be
1394 * visited, and <code>false</code> if the children of this node should
1397 public boolean visit(TryStatement node) {
1402 * Visits the given type-specific AST node.
1404 * The default implementation does nothing and return true.
1405 * Subclasses may reimplement.
1408 * @param node the node to visit
1409 * @return <code>true</code> if the children of this node should be
1410 * visited, and <code>false</code> if the children of this node should
1413 public boolean visit(TypeDeclaration node) {
1418 * Visits the given type-specific AST node.
1420 * The default implementation does nothing and return true.
1421 * Subclasses may reimplement.
1424 * @param node the node to visit
1425 * @return <code>true</code> if the children of this node should be
1426 * visited, and <code>false</code> if the children of this node should
1429 public boolean visit(TypeDeclarationStatement node) {
1434 * Visits the given type-specific AST node.
1436 * The default implementation does nothing and return true.
1437 * Subclasses may reimplement.
1440 * @param node the node to visit
1441 * @return <code>true</code> if the children of this node should be
1442 * visited, and <code>false</code> if the children of this node should
1445 public boolean visit(TypeLiteral node) {
1450 * Visits the given type-specific AST node.
1452 * The default implementation does nothing and return true.
1453 * Subclasses may reimplement.
1456 * @param node the node to visit
1457 * @return <code>true</code> if the children of this node should be
1458 * visited, and <code>false</code> if the children of this node should
1462 public boolean visit(TypeParameter node) {
1467 * Visits the given type-specific AST node.
1469 * The default implementation does nothing and return true.
1470 * Subclasses may reimplement.
1473 * @param node the node to visit
1474 * @return <code>true</code> if the children of this node should be
1475 * visited, and <code>false</code> if the children of this node should
1478 public boolean visit(VariableDeclarationExpression node) {
1483 * Visits the given type-specific AST node.
1485 * The default implementation does nothing and return true.
1486 * Subclasses may reimplement.
1489 * @param node the node to visit
1490 * @return <code>true</code> if the children of this node should be
1491 * visited, and <code>false</code> if the children of this node should
1494 public boolean visit(VariableDeclarationStatement node) {
1499 * Visits the given type-specific AST node.
1501 * The default implementation does nothing and return true.
1502 * Subclasses may reimplement.
1505 * @param node the node to visit
1506 * @return <code>true</code> if the children of this node should be
1507 * visited, and <code>false</code> if the children of this node should
1510 public boolean visit(VariableDeclarationFragment node) {
1515 * Visits the given type-specific AST node.
1517 * The default implementation does nothing and return true.
1518 * Subclasses may reimplement.
1521 * @param node the node to visit
1522 * @return <code>true</code> if the children of this node should be
1523 * visited, and <code>false</code> if the children of this node should
1526 public boolean visit(WhileStatement node) {
1531 * Visits the given type-specific AST node.
1533 * The default implementation does nothing and return true.
1534 * Subclasses may reimplement.
1537 * @param node the node to visit
1538 * @return <code>true</code> if the children of this node should be
1539 * visited, and <code>false</code> if the children of this node should
1543 public boolean visit(WildcardType node) {
1548 * End of visit the given type-specific AST node.
1550 * The default implementation does nothing. Subclasses may reimplement.
1553 * @param node the node to visit
1556 public void endVisit(AnnotationTypeDeclaration node) {
1557 // default implementation: do nothing
1561 * End of visit the given type-specific AST node.
1563 * The default implementation does nothing. Subclasses may reimplement.
1566 * @param node the node to visit
1569 public void endVisit(AnnotationTypeMemberDeclaration node) {
1570 // default implementation: do nothing
1574 * End of visit the given type-specific AST node.
1576 * The default implementation does nothing. Subclasses may reimplement.
1579 * @param node the node to visit
1581 public void endVisit(AnonymousClassDeclaration node) {
1582 // default implementation: do nothing
1586 * End of visit the given type-specific AST node.
1588 * The default implementation does nothing. Subclasses may reimplement.
1591 * @param node the node to visit
1593 public void endVisit(ArrayAccess node) {
1594 // default implementation: do nothing
1598 * End of visit the given type-specific AST node.
1600 * The default implementation does nothing. Subclasses may reimplement.
1603 * @param node the node to visit
1605 public void endVisit(ArrayCreation node) {
1606 // default implementation: do nothing
1610 * End of visit the given type-specific AST node.
1612 * The default implementation does nothing. Subclasses may reimplement.
1615 * @param node the node to visit
1617 public void endVisit(ArrayInitializer node) {
1618 // default implementation: do nothing
1622 * End of visit the given type-specific AST node.
1624 * The default implementation does nothing. Subclasses may reimplement.
1627 * @param node the node to visit
1629 public void endVisit(ArrayType node) {
1630 // default implementation: do nothing
1634 * End of visit the given type-specific AST node.
1636 * The default implementation does nothing. Subclasses may reimplement.
1639 * @param node the node to visit
1641 public void endVisit(AssertStatement node) {
1642 // default implementation: do nothing
1646 * End of visit the given type-specific AST node.
1648 * The default implementation does nothing. Subclasses may reimplement.
1651 * @param node the node to visit
1653 public void endVisit(Assignment node) {
1654 // default implementation: do nothing
1658 * End of visit the given type-specific AST node.
1660 * The default implementation does nothing. Subclasses may reimplement.
1663 * @param node the node to visit
1665 public void endVisit(Block node) {
1666 // default implementation: do nothing
1670 * End of visit the given type-specific AST node.
1672 * The default implementation does nothing. Subclasses may reimplement.
1674 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
1675 * not considered part of main structure of the AST. This method will
1676 * only be called if a client goes out of their way to visit this
1677 * kind of node explicitly.
1680 * @param node the node to visit
1683 public void endVisit(BlockComment node) {
1684 // default implementation: do nothing
1688 * End of visit the given type-specific AST node.
1690 * The default implementation does nothing. Subclasses may reimplement.
1693 * @param node the node to visit
1695 public void endVisit(BooleanLiteral node) {
1696 // default implementation: do nothing
1700 * End of visit the given type-specific AST node.
1702 * The default implementation does nothing. Subclasses may reimplement.
1705 * @param node the node to visit
1707 public void endVisit(BreakStatement node) {
1708 // default implementation: do nothing
1712 * End of visit the given type-specific AST node.
1714 * The default implementation does nothing. Subclasses may reimplement.
1717 * @param node the node to visit
1719 public void endVisit(CastExpression node) {
1720 // default implementation: do nothing
1724 * End of visit the given type-specific AST node.
1726 * The default implementation does nothing. Subclasses may reimplement.
1729 * @param node the node to visit
1731 public void endVisit(CatchClause node) {
1732 // default implementation: do nothing
1736 * End of visit the given type-specific AST node.
1738 * The default implementation does nothing. Subclasses may reimplement.
1741 * @param node the node to visit
1743 public void endVisit(CharacterLiteral node) {
1744 // default implementation: do nothing
1748 * End of visit the given type-specific AST node.
1750 * The default implementation does nothing. Subclasses may reimplement.
1753 * @param node the node to visit
1755 public void endVisit(ClassInstanceCreation node) {
1756 // default implementation: do nothing
1760 * End of visit the given type-specific AST node.
1762 * The default implementation does nothing. Subclasses may reimplement.
1765 * @param node the node to visit
1767 public void endVisit(CompilationUnit node) {
1768 // default implementation: do nothing
1772 * End of visit the given type-specific AST node.
1774 * The default implementation does nothing. Subclasses may reimplement.
1777 * @param node the node to visit
1779 public void endVisit(ConditionalExpression node) {
1780 // default implementation: do nothing
1784 * End of visit the given type-specific AST node.
1786 * The default implementation does nothing. Subclasses may reimplement.
1789 * @param node the node to visit
1791 public void endVisit(ConstructorInvocation node) {
1792 // default implementation: do nothing
1796 * End of visit the given type-specific AST node.
1798 * The default implementation does nothing. Subclasses may reimplement.
1801 * @param node the node to visit
1803 public void endVisit(ContinueStatement node) {
1804 // default implementation: do nothing
1808 * End of visit the given type-specific AST node.
1810 * The default implementation does nothing. Subclasses may reimplement.
1813 * @param node the node to visit
1815 public void endVisit(DoStatement node) {
1816 // default implementation: do nothing
1820 * End of visit the given type-specific AST node.
1822 * The default implementation does nothing. Subclasses may reimplement.
1825 * @param node the node to visit
1827 public void endVisit(EmptyStatement node) {
1828 // default implementation: do nothing
1832 * End of visit the given type-specific AST node.
1834 * The default implementation does nothing. Subclasses may reimplement.
1837 * @param node the node to visit
1840 public void endVisit(EnhancedForStatement node) {
1841 // default implementation: do nothing
1845 * End of visit the given type-specific AST node.
1847 * The default implementation does nothing. Subclasses may reimplement.
1850 * @param node the node to visit
1853 public void endVisit(EnumConstantDeclaration node) {
1854 // default implementation: do nothing
1858 * End of visit the given type-specific AST node.
1860 * The default implementation does nothing. Subclasses may reimplement.
1863 * @param node the node to visit
1866 public void endVisit(EnumDeclaration node) {
1867 // default implementation: do nothing
1871 * End of visit the given type-specific AST node.
1873 * The default implementation does nothing. Subclasses may reimplement.
1876 * @param node the node to visit
1878 public void endVisit(ExpressionStatement node) {
1879 // default implementation: do nothing
1883 * End of visit the given type-specific AST node.
1885 * The default implementation does nothing. Subclasses may reimplement.
1888 * @param node the node to visit
1890 public void endVisit(FieldAccess node) {
1891 // default implementation: do nothing
1895 * End of visit the given type-specific AST node.
1897 * The default implementation does nothing. Subclasses may reimplement.
1900 * @param node the node to visit
1902 public void endVisit(FieldDeclaration node) {
1903 // default implementation: do nothing
1907 * End of visit the given type-specific AST node.
1909 * The default implementation does nothing. Subclasses may reimplement.
1912 * @param node the node to visit
1914 public void endVisit(ForStatement node) {
1915 // default implementation: do nothing
1919 * End of visit the given type-specific AST node.
1921 * The default implementation does nothing. Subclasses may reimplement.
1924 * @param node the node to visit
1926 public void endVisit(IfStatement node) {
1927 // default implementation: do nothing
1931 * End of visit the given type-specific AST node.
1933 * The default implementation does nothing. Subclasses may reimplement.
1936 * @param node the node to visit
1938 public void endVisit(ImportDeclaration node) {
1939 // default implementation: do nothing
1943 * End of visit the given type-specific AST node.
1945 * The default implementation does nothing. Subclasses may reimplement.
1948 * @param node the node to visit
1950 public void endVisit(InfixExpression node) {
1951 // default implementation: do nothing
1955 * End of visit the given type-specific AST node.
1957 * The default implementation does nothing. Subclasses may reimplement.
1960 * @param node the node to visit
1962 public void endVisit(InstanceofExpression node) {
1963 // default implementation: do nothing
1967 * End of visit the given type-specific AST node.
1969 * The default implementation does nothing. Subclasses may reimplement.
1972 * @param node the node to visit
1974 public void endVisit(Initializer node) {
1975 // default implementation: do nothing
1979 * End of visit the given type-specific AST node.
1981 * The default implementation does nothing. Subclasses may reimplement.
1984 * @param node the node to visit
1986 public void endVisit(Javadoc node) {
1987 // default implementation: do nothing
1991 * End of visit the given type-specific AST node.
1993 * The default implementation does nothing. Subclasses may reimplement.
1996 * @param node the node to visit
1998 public void endVisit(LabeledStatement node) {
1999 // default implementation: do nothing
2003 * End of visit the given type-specific AST node.
2005 * The default implementation does nothing. Subclasses may reimplement.
2007 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
2008 * not considered part of main structure of the AST. This method will
2009 * only be called if a client goes out of their way to visit this
2010 * kind of node explicitly.
2013 * @param node the node to visit
2016 public void endVisit(LineComment node) {
2017 // default implementation: do nothing
2021 * End of visit the given type-specific AST node.
2023 * The default implementation does nothing. Subclasses may reimplement.
2026 * @param node the node to visit
2029 public void endVisit(MarkerAnnotation node) {
2030 // default implementation: do nothing
2034 * End of visit the given type-specific AST node.
2036 * The default implementation does nothing. Subclasses may reimplement.
2039 * @param node the node to visit
2042 public void endVisit(MemberRef node) {
2043 // default implementation: do nothing
2047 * End of visit the given type-specific AST node.
2049 * The default implementation does nothing. Subclasses may reimplement.
2052 * @param node the node to visit
2055 public void endVisit(MemberValuePair node) {
2056 // default implementation: do nothing
2060 * End of visit the given type-specific AST node.
2062 * The default implementation does nothing. Subclasses may reimplement.
2065 * @param node the node to visit
2068 public void endVisit(MethodRef node) {
2069 // default implementation: do nothing
2073 * End of visit the given type-specific AST node.
2075 * The default implementation does nothing. Subclasses may reimplement.
2078 * @param node the node to visit
2081 public void endVisit(MethodRefParameter node) {
2082 // default implementation: do nothing
2086 * End of visit the given type-specific AST node.
2088 * The default implementation does nothing. Subclasses may reimplement.
2091 * @param node the node to visit
2093 public void endVisit(MethodDeclaration node) {
2094 // default implementation: do nothing
2098 * End of visit the given type-specific AST node.
2100 * The default implementation does nothing. Subclasses may reimplement.
2103 * @param node the node to visit
2105 public void endVisit(MethodInvocation node) {
2106 // default implementation: do nothing
2110 * End of visit the given type-specific AST node.
2112 * The default implementation does nothing. Subclasses may reimplement.
2115 * @param node the node to visit
2118 public void endVisit(Modifier node) {
2119 // default implementation: do nothing
2123 * End of visit the given type-specific AST node.
2125 * The default implementation does nothing. Subclasses may reimplement.
2128 * @param node the node to visit
2131 public void endVisit(NormalAnnotation node) {
2132 // default implementation: do nothing
2136 * End of visit the given type-specific AST node.
2138 * The default implementation does nothing. Subclasses may reimplement.
2141 * @param node the node to visit
2143 public void endVisit(NullLiteral node) {
2144 // default implementation: do nothing
2148 * End of visit the given type-specific AST node.
2150 * The default implementation does nothing. Subclasses may reimplement.
2153 * @param node the node to visit
2155 public void endVisit(NumberLiteral node) {
2156 // default implementation: do nothing
2160 * End of visit the given type-specific AST node.
2162 * The default implementation does nothing. Subclasses may reimplement.
2165 * @param node the node to visit
2167 public void endVisit(PackageDeclaration node) {
2168 // default implementation: do nothing
2172 * End of visit the given type-specific AST node.
2174 * The default implementation does nothing. Subclasses may reimplement.
2177 * @param node the node to visit
2180 public void endVisit(ParameterizedType node) {
2181 // default implementation: do nothing
2185 * End of visit the given type-specific AST node.
2187 * The default implementation does nothing. Subclasses may reimplement.
2190 * @param node the node to visit
2192 public void endVisit(ParenthesizedExpression node) {
2193 // default implementation: do nothing
2197 * End of visit the given type-specific AST node.
2199 * The default implementation does nothing. Subclasses may reimplement.
2202 * @param node the node to visit
2204 public void endVisit(PostfixExpression node) {
2205 // default implementation: do nothing
2209 * End of visit the given type-specific AST node.
2211 * The default implementation does nothing. Subclasses may reimplement.
2214 * @param node the node to visit
2216 public void endVisit(PrefixExpression node) {
2217 // default implementation: do nothing
2221 * End of visit the given type-specific AST node.
2223 * The default implementation does nothing. Subclasses may reimplement.
2226 * @param node the node to visit
2228 public void endVisit(PrimitiveType node) {
2229 // default implementation: do nothing
2233 * End of visit the given type-specific AST node.
2235 * The default implementation does nothing. Subclasses may reimplement.
2238 * @param node the node to visit
2240 public void endVisit(QualifiedName node) {
2241 // default implementation: do nothing
2245 * End of visit the given type-specific AST node.
2247 * The default implementation does nothing. Subclasses may reimplement.
2250 * @param node the node to visit
2253 public void endVisit(QualifiedType node) {
2254 // default implementation: do nothing
2258 * End of visit the given type-specific AST node.
2260 * The default implementation does nothing. Subclasses may reimplement.
2263 * @param node the node to visit
2265 public void endVisit(ReturnStatement node) {
2266 // default implementation: do nothing
2270 * End of visit the given type-specific AST node.
2272 * The default implementation does nothing. Subclasses may reimplement.
2275 * @param node the node to visit
2277 public void endVisit(SimpleName node) {
2278 // default implementation: do nothing
2282 * End of visit the given type-specific AST node.
2284 * The default implementation does nothing. Subclasses may reimplement.
2287 * @param node the node to visit
2289 public void endVisit(SimpleType node) {
2290 // default implementation: do nothing
2294 * End of visit the given type-specific AST node.
2296 * The default implementation does nothing. Subclasses may reimplement.
2299 * @param node the node to visit
2302 public void endVisit(SingleMemberAnnotation node) {
2303 // default implementation: do nothing
2307 * End of visit the given type-specific AST node.
2309 * The default implementation does nothing. Subclasses may reimplement.
2312 * @param node the node to visit
2314 public void endVisit(SingleVariableDeclaration node) {
2315 // default implementation: do nothing
2319 * End of visit the given type-specific AST node.
2321 * The default implementation does nothing. Subclasses may reimplement.
2324 * @param node the node to visit
2326 public void endVisit(StringLiteral node) {
2327 // default implementation: do nothing
2331 * End of visit the given type-specific AST node.
2333 * The default implementation does nothing. Subclasses may reimplement.
2336 * @param node the node to visit
2338 public void endVisit(SuperConstructorInvocation node) {
2339 // default implementation: do nothing
2343 * End of visit the given type-specific AST node.
2345 * The default implementation does nothing. Subclasses may reimplement.
2348 * @param node the node to visit
2350 public void endVisit(SuperFieldAccess node) {
2351 // default implementation: do nothing
2355 * End of visit the given type-specific AST node.
2357 * The default implementation does nothing. Subclasses may reimplement.
2360 * @param node the node to visit
2362 public void endVisit(SuperMethodInvocation node) {
2363 // default implementation: do nothing
2367 * End of visit the given type-specific AST node.
2369 * The default implementation does nothing. Subclasses may reimplement.
2372 * @param node the node to visit
2374 public void endVisit(SwitchCase node) {
2375 // default implementation: do nothing
2379 * End of visit the given type-specific AST node.
2381 * The default implementation does nothing. Subclasses may reimplement.
2384 * @param node the node to visit
2386 public void endVisit(SwitchStatement node) {
2387 // default implementation: do nothing
2391 * End of visit the given type-specific AST node.
2393 * The default implementation does nothing. Subclasses may reimplement.
2396 * @param node the node to visit
2398 public void endVisit(SynchronizedStatement node) {
2399 // default implementation: do nothing
2403 * End of visit the given type-specific AST node.
2405 * The default implementation does nothing. Subclasses may reimplement.
2408 * @param node the node to visit
2411 public void endVisit(TagElement node) {
2412 // default implementation: do nothing
2416 * End of visit the given type-specific AST node.
2418 * The default implementation does nothing. Subclasses may reimplement.
2421 * @param node the node to visit
2424 public void endVisit(TextElement node) {
2425 // default implementation: do nothing
2429 * End of visit the given type-specific AST node.
2431 * The default implementation does nothing. Subclasses may reimplement.
2434 * @param node the node to visit
2436 public void endVisit(ThisExpression node) {
2437 // default implementation: do nothing
2441 * End of visit the given type-specific AST node.
2443 * The default implementation does nothing. Subclasses may reimplement.
2446 * @param node the node to visit
2448 public void endVisit(ThrowStatement node) {
2449 // default implementation: do nothing
2453 * End of visit the given type-specific AST node.
2455 * The default implementation does nothing. Subclasses may reimplement.
2458 * @param node the node to visit
2460 public void endVisit(TryStatement node) {
2461 // default implementation: do nothing
2465 * End of visit the given type-specific AST node.
2467 * The default implementation does nothing. Subclasses may reimplement.
2470 * @param node the node to visit
2472 public void endVisit(TypeDeclaration node) {
2473 // default implementation: do nothing
2477 * End of visit the given type-specific AST node.
2479 * The default implementation does nothing. Subclasses may reimplement.
2482 * @param node the node to visit
2484 public void endVisit(TypeDeclarationStatement node) {
2485 // default implementation: do nothing
2489 * End of visit the given type-specific AST node.
2491 * The default implementation does nothing. Subclasses may reimplement.
2494 * @param node the node to visit
2496 public void endVisit(TypeLiteral node) {
2497 // default implementation: do nothing
2501 * End of visit the given type-specific AST node.
2503 * The default implementation does nothing. Subclasses may reimplement.
2506 * @param node the node to visit
2509 public void endVisit(TypeParameter node) {
2510 // default implementation: do nothing
2514 * End of visit the given type-specific AST node.
2516 * The default implementation does nothing. Subclasses may reimplement.
2519 * @param node the node to visit
2521 public void endVisit(VariableDeclarationExpression node) {
2522 // default implementation: do nothing
2526 * End of visit the given type-specific AST node.
2528 * The default implementation does nothing. Subclasses may reimplement.
2531 * @param node the node to visit
2533 public void endVisit(VariableDeclarationStatement node) {
2534 // default implementation: do nothing
2538 * End of visit the given type-specific AST node.
2540 * The default implementation does nothing. Subclasses may reimplement.
2543 * @param node the node to visit
2545 public void endVisit(VariableDeclarationFragment node) {
2546 // default implementation: do nothing
2550 * End of visit the given type-specific AST node.
2552 * The default implementation does nothing. Subclasses may reimplement.
2555 * @param node the node to visit
2557 public void endVisit(WhileStatement node) {
2558 // default implementation: do nothing
2562 * End of visit the given type-specific AST node.
2564 * The default implementation does nothing. Subclasses may reimplement.
2567 * @param node the node to visit
2570 public void endVisit(WildcardType node) {
2571 // default implementation: do nothing