KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > dom > ASTVisitor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.core.dom;
13
14 /**
15  * A visitor for abstract syntax trees.
16  * <p>
17  * For each different concrete AST node type <it>T</it> there are
18  * a pair of methods:
19  * <ul>
20  * <li><code>public boolean visit(<it>T</it> 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(<it>T</it> 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>
34  * </ul>
35  * </p>
36  * In addition, there are a pair of methods for visiting AST nodes in the
37  * abstract, regardless of node type:
38  * <ul>
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>
51  * </ul>
52  * <p>
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
58  * body declarations.
59  * </p>
60  * <p>
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  * <it>before</it> <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.
81  * </p>
82  * <p>
83  * Cases to watch out for:
84  * <ul>
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>
94  * </ul>
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
99  * comments nodes.
100  * </p>
101  *
102  * @see org.eclipse.jdt.core.dom.ASTNode#accept(ASTVisitor)
103  */

104 public abstract class ASTVisitor {
105
106     /**
107      * Indicates whether doc tags should be visited by default.
108      * @since 3.0
109      */

110     private boolean visitDocTags;
111     
112     /**
113      * Creates a new AST visitor instance.
114      * <p>
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.
119      * </p>
120      */

121     public ASTVisitor() {
122         this(false);
123     }
124     
125     /**
126      * Creates a new AST visitor instance.
127      *
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)
132      * @since 3.0
133      */

134     public ASTVisitor(boolean visitDocTags) {
135         this.visitDocTags = visitDocTags;
136     }
137     
138     /**
139      * Visits the given AST node prior to the type-specific visit.
140      * (before <code>visit</code>).
141      * <p>
142      * The default implementation does nothing. Subclasses may reimplement.
143      * </p>
144      *
145      * @param node the node to visit
146      */

147     public void preVisit(ASTNode node) {
148         // default implementation: do nothing
149
}
150     
151     /**
152      * Visits the given AST node following the type-specific visit
153      * (after <code>endVisit</code>).
154      * <p>
155      * The default implementation does nothing. Subclasses may reimplement.
156      * </p>
157      *
158      * @param node the node to visit
159      */

160     public void postVisit(ASTNode node) {
161         // default implementation: do nothing
162
}
163
164
165     /**
166      * Visits the given type-specific AST node.
167      * <p>
168      * The default implementation does nothing and return true.
169      * Subclasses may reimplement.
170      * </p>
171      *
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
175      * be skipped
176      * @since 3.1
177      */

178     public boolean visit(AnnotationTypeDeclaration node) {
179         return true;
180     }
181
182
183     /**
184      * Visits the given type-specific AST node.
185      * <p>
186      * The default implementation does nothing and return true.
187      * Subclasses may reimplement.
188      * </p>
189      *
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
193      * be skipped
194      * @since 3.1
195      */

196     public boolean visit(AnnotationTypeMemberDeclaration node) {
197         return true;
198     }
199
200     /**
201      * Visits the given type-specific AST node.
202      * <p>
203      * The default implementation does nothing and return true.
204      * Subclasses may reimplement.
205      * </p>
206      *
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
210      * be skipped
211      */

212     public boolean visit(AnonymousClassDeclaration node) {
213         return true;
214     }
215
216     /**
217      * Visits the given type-specific AST node.
218      * <p>
219      * The default implementation does nothing and return true.
220      * Subclasses may reimplement.
221      * </p>
222      *
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
226      * be skipped
227      */

228     public boolean visit(ArrayAccess node) {
229         return true;
230     }
231
232     /**
233      * Visits the given type-specific AST node.
234      * <p>
235      * The default implementation does nothing and return true.
236      * Subclasses may reimplement.
237      * </p>
238      *
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
242      * be skipped
243      */

244     public boolean visit(ArrayCreation node) {
245         return true;
246     }
247
248     /**
249      * Visits the given type-specific AST node.
250      * <p>
251      * The default implementation does nothing and return true.
252      * Subclasses may reimplement.
253      * </p>
254      *
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
258      * be skipped
259      */

260     public boolean visit(ArrayInitializer node) {
261         return true;
262     }
263
264     /**
265      * Visits the given type-specific AST node.
266      * <p>
267      * The default implementation does nothing and return true.
268      * Subclasses may reimplement.
269      * </p>
270      *
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
274      * be skipped
275      */

276     public boolean visit(ArrayType node) {
277         return true;
278     }
279
280     /**
281      * Visits the given type-specific AST node.
282      * <p>
283      * The default implementation does nothing and return true.
284      * Subclasses may reimplement.
285      * </p>
286      *
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
290      * be skipped
291      */

292     public boolean visit(AssertStatement node) {
293         return true;
294     }
295
296     /**
297      * Visits the given type-specific AST node.
298      * <p>
299      * The default implementation does nothing and return true.
300      * Subclasses may reimplement.
301      * </p>
302      *
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
306      * be skipped
307      */

308     public boolean visit(Assignment node) {
309         return true;
310     }
311
312     /**
313      * Visits the given type-specific AST node.
314      * <p>
315      * The default implementation does nothing and return true.
316      * Subclasses may reimplement.
317      * </p>
318      *
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
322      * be skipped
323      */

324     public boolean visit(Block node) {
325         return true;
326     }
327     
328
329     /**
330      * Visits the given type-specific AST node.
331      * <p>
332      * The default implementation does nothing and return true.
333      * Subclasses may reimplement.
334      * </p>
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.
339      * </p>
340      *
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
344      * be skipped
345      * @since 3.0
346      */

347     public boolean visit(BlockComment node) {
348         return true;
349     }
350
351     /**
352      * Visits the given type-specific AST node.
353      * <p>
354      * The default implementation does nothing and return true.
355      * Subclasses may reimplement.
356      * </p>
357      *
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
361      * be skipped
362      */

363     public boolean visit(BooleanLiteral node) {
364         return true;
365     }
366
367     /**
368      * Visits the given type-specific AST node.
369      * <p>
370      * The default implementation does nothing and return true.
371      * Subclasses may reimplement.
372      * </p>
373      *
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
377      * be skipped
378      */

379     public boolean visit(BreakStatement node) {
380         return true;
381     }
382
383     /**
384      * Visits the given type-specific AST node.
385      * <p>
386      * The default implementation does nothing and return true.
387      * Subclasses may reimplement.
388      * </p>
389      *
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
393      * be skipped
394      */

395     public boolean visit(CastExpression node) {
396         return true;
397     }
398
399     /**
400      * Visits the given type-specific AST node.
401      * <p>
402      * The default implementation does nothing and return true.
403      * Subclasses may reimplement.
404      * </p>
405      *
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
409      * be skipped
410      */

411     public boolean visit(CatchClause node) {
412         return true;
413     }
414
415     /**
416      * Visits the given type-specific AST node.
417      * <p>
418      * The default implementation does nothing and return true.
419      * Subclasses may reimplement.
420      * </p>
421      *
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
425      * be skipped
426      */

427     public boolean visit(CharacterLiteral node) {
428         return true;
429     }
430
431     /**
432      * Visits the given type-specific AST node.
433      * <p>
434      * The default implementation does nothing and return true.
435      * Subclasses may reimplement.
436      * </p>
437      *
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
441      * be skipped
442      */

443     public boolean visit(ClassInstanceCreation node) {
444         return true;
445     }
446
447     /**
448      * Visits the given type-specific AST node.
449      * <p>
450      * The default implementation does nothing and return true.
451      * Subclasses may reimplement.
452      * </p>
453      *
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
457      * be skipped
458      */

459     public boolean visit(CompilationUnit node) {
460         return true;
461     }
462
463     /**
464      * Visits the given type-specific AST node.
465      * <p>
466      * The default implementation does nothing and return true.
467      * Subclasses may reimplement.
468      * </p>
469      *
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
473      * be skipped
474      */

475     public boolean visit(ConditionalExpression node) {
476         return true;
477     }
478
479     /**
480      * Visits the given type-specific AST node.
481      * <p>
482      * The default implementation does nothing and return true.
483      * Subclasses may reimplement.
484      * </p>
485      *
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
489      * be skipped
490      */

491     public boolean visit(ConstructorInvocation node) {
492         return true;
493     }
494
495     /**
496      * Visits the given type-specific AST node.
497      * <p>
498      * The default implementation does nothing and return true.
499      * Subclasses may reimplement.
500      * </p>
501      *
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
505      * be skipped
506      */

507     public boolean visit(ContinueStatement node) {
508         return true;
509     }
510
511     /**
512      * Visits the given type-specific AST node.
513      * <p>
514      * The default implementation does nothing and return true.
515      * Subclasses may reimplement.
516      * </p>
517      *
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
521      * be skipped
522      */

523     public boolean visit(DoStatement node) {
524         return true;
525     }
526
527     /**
528      * Visits the given type-specific AST node.
529      * <p>
530      * The default implementation does nothing and return true.
531      * Subclasses may reimplement.
532      * </p>
533      *
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
537      * be skipped
538      */

539     public boolean visit(EmptyStatement node) {
540         return true;
541     }
542
543     /**
544      * Visits the given type-specific AST node.
545      * <p>
546      * The default implementation does nothing and return true.
547      * Subclasses may reimplement.
548      * </p>
549      *
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
553      * be skipped
554      * @since 3.1
555      */

556     public boolean visit(EnhancedForStatement node) {
557         return true;
558     }
559
560     /**
561      * Visits the given type-specific AST node.
562      * <p>
563      * The default implementation does nothing and return true.
564      * Subclasses may reimplement.
565      * </p>
566      *
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
570      * be skipped
571      * @since 3.1
572      */

573     public boolean visit(EnumConstantDeclaration node) {
574         return true;
575     }
576
577     /**
578      * Visits the given type-specific AST node.
579      * <p>
580      * The default implementation does nothing and return true.
581      * Subclasses may reimplement.
582      * </p>
583      *
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
587      * be skipped
588      * @since 3.1
589      */

590     public boolean visit(EnumDeclaration node) {
591         return true;
592     }
593
594     /**
595      * Visits the given type-specific AST node.
596      * <p>
597      * The default implementation does nothing and return true.
598      * Subclasses may reimplement.
599      * </p>
600      *
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
604      * be skipped
605      */

606     public boolean visit(ExpressionStatement node) {
607         return true;
608     }
609
610     /**
611      * Visits the given type-specific AST node.
612      * <p>
613      * The default implementation does nothing and return true.
614      * Subclasses may reimplement.
615      * </p>
616      *
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
620      * be skipped
621      */

622     public boolean visit(FieldAccess node) {
623         return true;
624     }
625
626     /**
627      * Visits the given type-specific AST node.
628      * <p>
629      * The default implementation does nothing and return true.
630      * Subclasses may reimplement.
631      * </p>
632      *
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
636      * be skipped
637      */

638     public boolean visit(FieldDeclaration node) {
639         return true;
640     }
641
642     /**
643      * Visits the given type-specific AST node.
644      * <p>
645      * The default implementation does nothing and return true.
646      * Subclasses may reimplement.
647      * </p>
648      *
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
652      * be skipped
653      */

654     public boolean visit(ForStatement node) {
655         return true;
656     }
657
658     /**
659      * Visits the given type-specific AST node.
660      * <p>
661      * The default implementation does nothing and return true.
662      * Subclasses may reimplement.
663      * </p>
664      *
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
668      * be skipped
669      */

670     public boolean visit(IfStatement node) {
671         return true;
672     }
673
674     /**
675      * Visits the given type-specific AST node.
676      * <p>
677      * The default implementation does nothing and return true.
678      * Subclasses may reimplement.
679      * </p>
680      *
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
684      * be skipped
685      */

686     public boolean visit(ImportDeclaration node) {
687         return true;
688     }
689
690     /**
691      * Visits the given type-specific AST node.
692      * <p>
693      * The default implementation does nothing and return true.
694      * Subclasses may reimplement.
695      * </p>
696      *
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
700      * be skipped
701      */

702     public boolean visit(InfixExpression node) {
703         return true;
704     }
705
706     /**
707      * Visits the given type-specific AST node.
708      * <p>
709      * The default implementation does nothing and return true.
710      * Subclasses may reimplement.
711      * </p>
712      *
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
716      * be skipped
717      */

718     public boolean visit(InstanceofExpression node) {
719         return true;
720     }
721
722     /**
723      * Visits the given type-specific AST node.
724      * <p>
725      * The default implementation does nothing and return true.
726      * Subclasses may reimplement.
727      * </p>
728      *
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
732      * be skipped
733      */

734     public boolean visit(Initializer node) {
735         return true;
736     }
737
738     /**
739      * Visits the given AST node.
740      * <p>
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.
746      * </p>
747      *
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
751      * be skipped
752      * @see #ASTVisitor()
753      * @see #ASTVisitor(boolean)
754      */

755     public boolean visit(Javadoc node) {
756         // visit tag elements inside doc comments only if requested
757
return this.visitDocTags;
758     }
759     
760     /**
761      * Visits the given type-specific AST node.
762      * <p>
763      * The default implementation does nothing and return true.
764      * Subclasses may reimplement.
765      * </p>
766      *
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
770      * be skipped
771      */

772     public boolean visit(LabeledStatement node) {
773         return true;
774     }
775     
776     
777     /**
778      * Visits the given type-specific AST node.
779      * <p>
780      * The default implementation does nothing and return true.
781      * Subclasses may reimplement.
782      * </p>
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.
787      * </p>
788      *
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
792      * be skipped
793      * @since 3.0
794      */

795     public boolean visit(LineComment node) {
796         return true;
797     }
798
799     
800     /**
801      * Visits the given type-specific AST node.
802      * <p>
803      * The default implementation does nothing and return true.
804      * Subclasses may reimplement.
805      * </p>
806      *
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
810      * be skipped
811      * @since 3.1
812      */

813     public boolean visit(MarkerAnnotation node) {
814         return true;
815     }
816
817     
818     /**
819      * Visits the given type-specific AST node.
820      * <p>
821      * The default implementation does nothing and return true.
822      * Subclasses may reimplement.
823      * </p>
824      *
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
828      * be skipped
829      * @since 3.0
830      */

831     public boolean visit(MemberRef node) {
832         return true;
833     }
834
835     
836     /**
837      * Visits the given type-specific AST node.
838      * <p>
839      * The default implementation does nothing and return true.
840      * Subclasses may reimplement.
841      * </p>
842      *
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
846      * be skipped
847      * @since 3.1
848      */

849     public boolean visit(MemberValuePair node) {
850         return true;
851     }
852
853     
854     /**
855      * Visits the given type-specific AST node.
856      * <p>
857      * The default implementation does nothing and return true.
858      * Subclasses may reimplement.
859      * </p>
860      *
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
864      * be skipped
865      * @since 3.0
866      */

867     public boolean visit(MethodRef node) {
868         return true;
869     }
870
871     
872     /**
873      * Visits the given type-specific AST node.
874      * <p>
875      * The default implementation does nothing and return true.
876      * Subclasses may reimplement.
877      * </p>
878      *
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
882      * be skipped
883      * @since 3.0
884      */

885     public boolean visit(MethodRefParameter node) {
886         return true;
887     }
888     
889     
890     /**
891      * Visits the given type-specific AST node.
892      * <p>
893      * The default implementation does nothing and return true.
894      * Subclasses may reimplement.
895      * </p>
896      *
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
900      * be skipped
901      */

902     public boolean visit(MethodDeclaration node) {
903         return true;
904     }
905     
906     /**
907      * Visits the given type-specific AST node.
908      * <p>
909      * The default implementation does nothing and return true.
910      * Subclasses may reimplement.
911      * </p>
912      *
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
916      * be skipped
917      */

918     public boolean visit(MethodInvocation node) {
919         return true;
920     }
921
922     
923     /**
924      * Visits the given type-specific AST node.
925      * <p>
926      * The default implementation does nothing and return true.
927      * Subclasses may reimplement.
928      * </p>
929      *
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
933      * be skipped
934      * @since 3.1
935      */

936     public boolean visit(Modifier node) {
937         return true;
938     }
939
940     
941     /**
942      * Visits the given type-specific AST node.
943      * <p>
944      * The default implementation does nothing and return true.
945      * Subclasses may reimplement.
946      * </p>
947      *
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
951      * be skipped
952      * @since 3.1
953      */

954     public boolean visit(NormalAnnotation node) {
955         return true;
956     }
957     
958     /**
959      * Visits the given type-specific AST node.
960      * <p>
961      * The default implementation does nothing and return true.
962      * Subclasses may reimplement.
963      * </p>
964      *
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
968      * be skipped
969      */

970     public boolean visit(NullLiteral node) {
971         return true;
972     }
973     
974     /**
975      * Visits the given type-specific AST node.
976      * <p>
977      * The default implementation does nothing and return true.
978      * Subclasses may reimplement.
979      * </p>
980      *
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
984      * be skipped
985      */

986     public boolean visit(NumberLiteral node) {
987         return true;
988     }
989     
990     /**
991      * Visits the given type-specific AST node.
992      * <p>
993      * The default implementation does nothing and return true.
994      * Subclasses may reimplement.
995      * </p>
996      *
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
1000     * be skipped
1001     */

1002    public boolean visit(PackageDeclaration node) {
1003        return true;
1004    }
1005
1006    
1007    /**
1008     * Visits the given type-specific AST node.
1009     * <p>
1010     * The default implementation does nothing and return true.
1011     * Subclasses may reimplement.
1012     * </p>
1013     *
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
1017     * be skipped
1018     * @since 3.1
1019     */

1020    public boolean visit(ParameterizedType node) {
1021        return true;
1022    }
1023    
1024    /**
1025     * Visits the given type-specific AST node.
1026     * <p>
1027     * The default implementation does nothing and return true.
1028     * Subclasses may reimplement.
1029     * </p>
1030     *
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
1034     * be skipped
1035     */

1036    public boolean visit(ParenthesizedExpression node) {
1037        return true;
1038    }
1039    
1040    /**
1041     * Visits the given type-specific AST node.
1042     * <p>
1043     * The default implementation does nothing and return true.
1044     * Subclasses may reimplement.
1045     * </p>
1046     *
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
1050     * be skipped
1051     */

1052    public boolean visit(PostfixExpression node) {
1053        return true;
1054    }
1055    
1056    /**
1057     * Visits the given type-specific AST node.
1058     * <p>
1059     * The default implementation does nothing and return true.
1060     * Subclasses may reimplement.
1061     * </p>
1062     *
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
1066     * be skipped
1067     */

1068    public boolean visit(PrefixExpression node) {
1069        return true;
1070    }
1071    
1072    /**
1073     * Visits the given type-specific AST node.
1074     * <p>
1075     * The default implementation does nothing and return true.
1076     * Subclasses may reimplement.
1077     * </p>
1078     *
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
1082     * be skipped
1083     */

1084    public boolean visit(PrimitiveType node) {
1085        return true;
1086    }
1087    
1088    /**
1089     * Visits the given type-specific AST node.
1090     * <p>
1091     * The default implementation does nothing and return true.
1092     * Subclasses may reimplement.
1093     * </p>
1094     *
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
1098     * be skipped
1099     */

1100    public boolean visit(QualifiedName node) {
1101        return true;
1102    }
1103    
1104    /**
1105     * Visits the given type-specific AST node.
1106     * <p>
1107     * The default implementation does nothing and return true.
1108     * Subclasses may reimplement.
1109     * </p>
1110     *
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
1114     * be skipped
1115     * @since 3.1
1116     */

1117    public boolean visit(QualifiedType node) {
1118        return true;
1119    }
1120    
1121    /**
1122     * Visits the given type-specific AST node.
1123     * <p>
1124     * The default implementation does nothing and return true.
1125     * Subclasses may reimplement.
1126     * </p>
1127     *
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
1131     * be skipped
1132     */

1133    public boolean visit(ReturnStatement node) {
1134        return true;
1135    }
1136    
1137    /**
1138     * Visits the given type-specific AST node.
1139     * <p>
1140     * The default implementation does nothing and return true.
1141     * Subclasses may reimplement.
1142     * </p>
1143     *
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
1147     * be skipped
1148     */

1149    public boolean visit(SimpleName node) {
1150        return true;
1151    }
1152    
1153    /**
1154     * Visits the given type-specific AST node.
1155     * <p>
1156     * The default implementation does nothing and return true.
1157     * Subclasses may reimplement.
1158     * </p>
1159     *
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
1163     * be skipped
1164     */

1165    public boolean visit(SimpleType node) {
1166        return true;
1167    }
1168
1169    
1170    /**
1171     * Visits the given type-specific AST node.
1172     * <p>
1173     * The default implementation does nothing and return true.
1174     * Subclasses may reimplement.
1175     * </p>
1176     *
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
1180     * be skipped
1181     * @since 3.1
1182     */

1183    public boolean visit(SingleMemberAnnotation node) {
1184        return true;
1185    }
1186
1187    
1188    /**
1189     * Visits the given type-specific AST node.
1190     * <p>
1191     * The default implementation does nothing and return true.
1192     * Subclasses may reimplement.
1193     * </p>
1194     *
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
1198     * be skipped
1199     */

1200    public boolean visit(SingleVariableDeclaration node) {
1201        return true;
1202    }
1203    
1204    /**
1205     * Visits the given type-specific AST node.
1206     * <p>
1207     * The default implementation does nothing and return true.
1208     * Subclasses may reimplement.
1209     * </p>
1210     *
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
1214     * be skipped
1215     */

1216    public boolean visit(StringLiteral node) {
1217        return true;
1218    }
1219    
1220    /**
1221     * Visits the given type-specific AST node.
1222     * <p>
1223     * The default implementation does nothing and return true.
1224     * Subclasses may reimplement.
1225     * </p>
1226     *
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
1230     * be skipped
1231     */

1232    public boolean visit(SuperConstructorInvocation node) {
1233        return true;
1234    }
1235    
1236    /**
1237     * Visits the given type-specific AST node.
1238     * <p>
1239     * The default implementation does nothing and return true.
1240     * Subclasses may reimplement.
1241     * </p>
1242     *
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
1246     * be skipped
1247     */

1248    public boolean visit(SuperFieldAccess node) {
1249        return true;
1250    }
1251    
1252    /**
1253     * Visits the given type-specific AST node.
1254     * <p>
1255     * The default implementation does nothing and return true.
1256     * Subclasses may reimplement.
1257     * </p>
1258     *
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
1262     * be skipped
1263     */

1264    public boolean visit(SuperMethodInvocation node) {
1265        return true;
1266    }
1267    
1268    /**
1269     * Visits the given type-specific AST node.
1270     * <p>
1271     * The default implementation does nothing and return true.
1272     * Subclasses may reimplement.
1273     * </p>
1274     *
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
1278     * be skipped
1279     */

1280    public boolean visit(SwitchCase node) {
1281        return true;
1282    }
1283    
1284    /**
1285     * Visits the given type-specific AST node.
1286     * <p>
1287     * The default implementation does nothing and return true.
1288     * Subclasses may reimplement.
1289     * </p>
1290     *
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
1294     * be skipped
1295     */

1296    public boolean visit(SwitchStatement node) {
1297        return true;
1298    }
1299    
1300    /**
1301     * Visits the given type-specific AST node.
1302     * <p>
1303     * The default implementation does nothing and return true.
1304     * Subclasses may reimplement.
1305     * </p>
1306     *
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
1310     * be skipped
1311     */

1312    public boolean visit(SynchronizedStatement node) {
1313        return true;
1314    }
1315
1316    
1317    /**
1318     * Visits the given type-specific AST node.
1319     * <p>
1320     * The default implementation does nothing and return true.
1321     * Subclasses may reimplement.
1322     * </p>
1323     *
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
1327     * be skipped
1328     * @since 3.0
1329     */

1330    public boolean visit(TagElement node) {
1331        return true;
1332    }
1333
1334    
1335    /**
1336     * Visits the given type-specific AST node.
1337     * <p>
1338     * The default implementation does nothing and return true.
1339     * Subclasses may reimplement.
1340     * </p>
1341     *
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
1345     * be skipped
1346     * @since 3.0
1347     */

1348    public boolean visit(TextElement node) {
1349        return true;
1350    }
1351
1352    
1353    /**
1354     * Visits the given type-specific AST node.
1355     * <p>
1356     * The default implementation does nothing and return true.
1357     * Subclasses may reimplement.
1358     * </p>
1359     *
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
1363     * be skipped
1364     */

1365    public boolean visit(ThisExpression node) {
1366        return true;
1367    }
1368    
1369    /**
1370     * Visits the given type-specific AST node.
1371     * <p>
1372     * The default implementation does nothing and return true.
1373     * Subclasses may reimplement.
1374     * </p>
1375     *
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
1379     * be skipped
1380     */

1381    public boolean visit(ThrowStatement node) {
1382        return true;
1383    }
1384    
1385    /**
1386     * Visits the given type-specific AST node.
1387     * <p>
1388     * The default implementation does nothing and return true.
1389     * Subclasses may reimplement.
1390     * </p>
1391     *
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
1395     * be skipped
1396     */

1397    public boolean visit(TryStatement node) {
1398        return true;
1399    }
1400    
1401    /**
1402     * Visits the given type-specific AST node.
1403     * <p>
1404     * The default implementation does nothing and return true.
1405     * Subclasses may reimplement.
1406     * </p>
1407     *
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
1411     * be skipped
1412     */

1413    public boolean visit(TypeDeclaration node) {
1414        return true;
1415    }
1416    
1417    /**
1418     * Visits the given type-specific AST node.
1419     * <p>
1420     * The default implementation does nothing and return true.
1421     * Subclasses may reimplement.
1422     * </p>
1423     *
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
1427     * be skipped
1428     */

1429    public boolean visit(TypeDeclarationStatement node) {
1430        return true;
1431    }
1432    
1433    /**
1434     * Visits the given type-specific AST node.
1435     * <p>
1436     * The default implementation does nothing and return true.
1437     * Subclasses may reimplement.
1438     * </p>
1439     *
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
1443     * be skipped
1444     */

1445    public boolean visit(TypeLiteral node) {
1446        return true;
1447    }
1448    
1449    /**
1450     * Visits the given type-specific AST node.
1451     * <p>
1452     * The default implementation does nothing and return true.
1453     * Subclasses may reimplement.
1454     * </p>
1455     *
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
1459     * be skipped
1460     * @since 3.1
1461     */

1462    public boolean visit(TypeParameter node) {
1463        return true;
1464    }
1465    
1466    /**
1467     * Visits the given type-specific AST node.
1468     * <p>
1469     * The default implementation does nothing and return true.
1470     * Subclasses may reimplement.
1471     * </p>
1472     *
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
1476     * be skipped
1477     */

1478    public boolean visit(VariableDeclarationExpression node) {
1479        return true;
1480    }
1481    
1482    /**
1483     * Visits the given type-specific AST node.
1484     * <p>
1485     * The default implementation does nothing and return true.
1486     * Subclasses may reimplement.
1487     * </p>
1488     *
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
1492     * be skipped
1493     */

1494    public boolean visit(VariableDeclarationStatement node) {
1495        return true;
1496    }
1497    
1498    /**
1499     * Visits the given type-specific AST node.
1500     * <p>
1501     * The default implementation does nothing and return true.
1502     * Subclasses may reimplement.
1503     * </p>
1504     *
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
1508     * be skipped
1509     */

1510    public boolean visit(VariableDeclarationFragment node) {
1511        return true;
1512    }
1513    
1514    /**
1515     * Visits the given type-specific AST node.
1516     * <p>
1517     * The default implementation does nothing and return true.
1518     * Subclasses may reimplement.
1519     * </p>
1520     *
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
1524     * be skipped
1525     */

1526    public boolean visit(WhileStatement node) {
1527        return true;
1528    }
1529    
1530    /**
1531     * Visits the given type-specific AST node.
1532     * <p>
1533     * The default implementation does nothing and return true.
1534     * Subclasses may reimplement.
1535     * </p>
1536     *
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
1540     * be skipped
1541     * @since 3.1
1542     */

1543    public boolean visit(WildcardType node) {
1544        return true;
1545    }
1546    
1547    /**
1548     * End of visit the given type-specific AST node.
1549     * <p>
1550     * The default implementation does nothing. Subclasses may reimplement.
1551     * </p>
1552     *
1553     * @param node the node to visit
1554     * @since 3.1
1555     */

1556    public void endVisit(AnnotationTypeDeclaration node) {
1557        // default implementation: do nothing
1558
}
1559
1560    /**
1561     * End of visit the given type-specific AST node.
1562     * <p>
1563     * The default implementation does nothing. Subclasses may reimplement.
1564     * </p>
1565     *
1566     * @param node the node to visit
1567     * @since 3.1
1568     */

1569    public void endVisit(AnnotationTypeMemberDeclaration node) {
1570        // default implementation: do nothing
1571
}
1572
1573    /**
1574     * End of visit the given type-specific AST node.
1575     * <p>
1576     * The default implementation does nothing. Subclasses may reimplement.
1577     * </p>
1578     *
1579     * @param node the node to visit
1580     */

1581    public void endVisit(AnonymousClassDeclaration node) {
1582        // default implementation: do nothing
1583
}
1584
1585    /**
1586     * End of visit the given type-specific AST node.
1587     * <p>
1588     * The default implementation does nothing. Subclasses may reimplement.
1589     * </p>
1590     *
1591     * @param node the node to visit
1592     */

1593    public void endVisit(ArrayAccess node) {
1594        // default implementation: do nothing
1595
}
1596
1597    /**
1598     * End of visit the given type-specific AST node.
1599     * <p>
1600     * The default implementation does nothing. Subclasses may reimplement.
1601     * </p>
1602     *
1603     * @param node the node to visit
1604     */

1605    public void endVisit(ArrayCreation node) {
1606        // default implementation: do nothing
1607
}
1608
1609    /**
1610     * End of visit the given type-specific AST node.
1611     * <p>
1612     * The default implementation does nothing. Subclasses may reimplement.
1613     * </p>
1614     *
1615     * @param node the node to visit
1616     */

1617    public void endVisit(ArrayInitializer node) {
1618        // default implementation: do nothing
1619
}
1620
1621    /**
1622     * End of visit the given type-specific AST node.
1623     * <p>
1624     * The default implementation does nothing. Subclasses may reimplement.
1625     * </p>
1626     *
1627     * @param node the node to visit
1628     */

1629    public void endVisit(ArrayType node) {
1630        // default implementation: do nothing
1631
}
1632
1633    /**
1634     * End of visit the given type-specific AST node.
1635     * <p>
1636     * The default implementation does nothing. Subclasses may reimplement.
1637     * </p>
1638     *
1639     * @param node the node to visit
1640     */

1641    public void endVisit(AssertStatement node) {
1642        // default implementation: do nothing
1643
}
1644
1645    /**
1646     * End of visit the given type-specific AST node.
1647     * <p>
1648     * The default implementation does nothing. Subclasses may reimplement.
1649     * </p>
1650     *
1651     * @param node the node to visit
1652     */

1653    public void endVisit(Assignment node) {
1654        // default implementation: do nothing
1655
}
1656
1657    /**
1658     * End of visit the given type-specific AST node.
1659     * <p>
1660     * The default implementation does nothing. Subclasses may reimplement.
1661     * </p>
1662     *
1663     * @param node the node to visit
1664     */

1665    public void endVisit(Block node) {
1666        // default implementation: do nothing
1667
}
1668    
1669    /**
1670     * End of visit the given type-specific AST node.
1671     * <p>
1672     * The default implementation does nothing. Subclasses may reimplement.
1673     * </p>
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.
1678     * </p>
1679     *
1680     * @param node the node to visit
1681     * @since 3.0
1682     */

1683    public void endVisit(BlockComment node) {
1684        // default implementation: do nothing
1685
}
1686
1687    /**
1688     * End of visit the given type-specific AST node.
1689     * <p>
1690     * The default implementation does nothing. Subclasses may reimplement.
1691     * </p>
1692     *
1693     * @param node the node to visit
1694     */

1695    public void endVisit(BooleanLiteral node) {
1696        // default implementation: do nothing
1697
}
1698
1699    /**
1700     * End of visit the given type-specific AST node.
1701     * <p>
1702     * The default implementation does nothing. Subclasses may reimplement.
1703     * </p>
1704     *
1705     * @param node the node to visit
1706     */

1707    public void endVisit(BreakStatement node) {
1708        // default implementation: do nothing
1709
}
1710
1711    /**
1712     * End of visit the given type-specific AST node.
1713     * <p>
1714     * The default implementation does nothing. Subclasses may reimplement.
1715     * </p>
1716     *
1717     * @param node the node to visit
1718     */

1719    public void endVisit(CastExpression node) {
1720        // default implementation: do nothing
1721
}
1722
1723    /**
1724     * End of visit the given type-specific AST node.
1725     * <p>
1726     * The default implementation does nothing. Subclasses may reimplement.
1727     * </p>
1728     *
1729     * @param node the node to visit
1730     */

1731    public void endVisit(CatchClause node) {
1732        // default implementation: do nothing
1733
}
1734
1735    /**
1736     * End of visit the given type-specific AST node.
1737     * <p>
1738     * The default implementation does nothing. Subclasses may reimplement.
1739     * </p>
1740     *
1741     * @param node the node to visit
1742     */

1743    public void endVisit(CharacterLiteral node) {
1744        // default implementation: do nothing
1745
}
1746
1747    /**
1748     * End of visit the given type-specific AST node.
1749     * <p>
1750     * The default implementation does nothing. Subclasses may reimplement.
1751     * </p>
1752     *
1753     * @param node the node to visit
1754     */

1755    public void endVisit(ClassInstanceCreation node) {
1756        // default implementation: do nothing
1757
}
1758
1759    /**
1760     * End of visit the given type-specific AST node.
1761     * <p>
1762     * The default implementation does nothing. Subclasses may reimplement.
1763     * </p>
1764     *
1765     * @param node the node to visit
1766     */

1767    public void endVisit(CompilationUnit node) {
1768        // default implementation: do nothing
1769
}
1770
1771    /**
1772     * End of visit the given type-specific AST node.
1773     * <p>
1774     * The default implementation does nothing. Subclasses may reimplement.
1775     * </p>
1776     *
1777     * @param node the node to visit
1778     */

1779    public void endVisit(ConditionalExpression node) {
1780        // default implementation: do nothing
1781
}
1782
1783    /**
1784     * End of visit the given type-specific AST node.
1785     * <p>
1786     * The default implementation does nothing. Subclasses may reimplement.
1787     * </p>
1788     *
1789     * @param node the node to visit
1790     */

1791    public void endVisit(ConstructorInvocation node) {
1792        // default implementation: do nothing
1793
}
1794
1795    /**
1796     * End of visit the given type-specific AST node.
1797     * <p>
1798     * The default implementation does nothing. Subclasses may reimplement.
1799     * </p>
1800     *
1801     * @param node the node to visit
1802     */

1803    public void endVisit(ContinueStatement node) {
1804        // default implementation: do nothing
1805
}
1806
1807    /**
1808     * End of visit the given type-specific AST node.
1809     * <p>
1810     * The default implementation does nothing. Subclasses may reimplement.
1811     * </p>
1812     *
1813     * @param node the node to visit
1814     */

1815    public void endVisit(DoStatement node) {
1816        // default implementation: do nothing
1817
}
1818
1819    /**
1820     * End of visit the given type-specific AST node.
1821     * <p>
1822     * The default implementation does nothing. Subclasses may reimplement.
1823     * </p>
1824     *
1825     * @param node the node to visit
1826     */

1827    public void endVisit(EmptyStatement node) {
1828        // default implementation: do nothing
1829
}
1830    
1831    /**
1832     * End of visit the given type-specific AST node.
1833     * <p>
1834     * The default implementation does nothing. Subclasses may reimplement.
1835     * </p>
1836     *
1837     * @param node the node to visit
1838     * @since 3.1
1839     */

1840    public void endVisit(EnhancedForStatement node) {
1841        // default implementation: do nothing
1842
}
1843    
1844    /**
1845     * End of visit the given type-specific AST node.
1846     * <p>
1847     * The default implementation does nothing. Subclasses may reimplement.
1848     * </p>
1849     *
1850     * @param node the node to visit
1851     * @since 3.1
1852     */

1853    public void endVisit(EnumConstantDeclaration node) {
1854        // default implementation: do nothing
1855
}
1856    
1857    /**
1858     * End of visit the given type-specific AST node.
1859     * <p>
1860     * The default implementation does nothing. Subclasses may reimplement.
1861     * </p>
1862     *
1863     * @param node the node to visit
1864     * @since 3.1
1865     */

1866    public void endVisit(EnumDeclaration node) {
1867        // default implementation: do nothing
1868
}
1869
1870    /**
1871     * End of visit the given type-specific AST node.
1872     * <p>
1873     * The default implementation does nothing. Subclasses may reimplement.
1874     * </p>
1875     *
1876     * @param node the node to visit
1877     */

1878    public void endVisit(ExpressionStatement node) {
1879        // default implementation: do nothing
1880
}
1881
1882    /**
1883     * End of visit the given type-specific AST node.
1884     * <p>
1885     * The default implementation does nothing. Subclasses may reimplement.
1886     * </p>
1887     *
1888     * @param node the node to visit
1889     */

1890    public void endVisit(FieldAccess node) {
1891        // default implementation: do nothing
1892
}
1893
1894    /**
1895     * End of visit the given type-specific AST node.
1896     * <p>
1897     * The default implementation does nothing. Subclasses may reimplement.
1898     * </p>
1899     *
1900     * @param node the node to visit
1901     */

1902    public void endVisit(FieldDeclaration node) {
1903        // default implementation: do nothing
1904
}
1905
1906    /**
1907     * End of visit the given type-specific AST node.
1908     * <p>
1909     * The default implementation does nothing. Subclasses may reimplement.
1910     * </p>
1911     *
1912     * @param node the node to visit
1913     */

1914    public void endVisit(ForStatement node) {
1915        // default implementation: do nothing
1916
}
1917
1918    /**
1919     * End of visit the given type-specific AST node.
1920     * <p>
1921     * The default implementation does nothing. Subclasses may reimplement.
1922     * </p>
1923     *
1924     * @param node the node to visit
1925     */

1926    public void endVisit(IfStatement node) {
1927        // default implementation: do nothing
1928
}
1929
1930    /**
1931     * End of visit the given type-specific AST node.
1932     * <p>
1933     * The default implementation does nothing. Subclasses may reimplement.
1934     * </p>
1935     *
1936     * @param node the node to visit
1937     */

1938    public void endVisit(ImportDeclaration node) {
1939        // default implementation: do nothing
1940
}
1941
1942    /**
1943     * End of visit the given type-specific AST node.
1944     * <p>
1945     * The default implementation does nothing. Subclasses may reimplement.
1946     * </p>
1947     *
1948     * @param node the node to visit
1949     */

1950    public void endVisit(InfixExpression node) {
1951        // default implementation: do nothing
1952
}
1953
1954    /**
1955     * End of visit the given type-specific AST node.
1956     * <p>
1957     * The default implementation does nothing. Subclasses may reimplement.
1958     * </p>
1959     *
1960     * @param node the node to visit
1961     */

1962    public void endVisit(InstanceofExpression node) {
1963        // default implementation: do nothing
1964
}
1965
1966    /**
1967     * End of visit the given type-specific AST node.
1968     * <p>
1969     * The default implementation does nothing. Subclasses may reimplement.
1970     * </p>
1971     *
1972     * @param node the node to visit
1973     */

1974    public void endVisit(Initializer node) {
1975        // default implementation: do nothing
1976
}
1977
1978    /**
1979     * End of visit the given type-specific AST node.
1980     * <p>
1981     * The default implementation does nothing. Subclasses may reimplement.
1982     * </p>
1983     *
1984     * @param node the node to visit
1985     */

1986    public void endVisit(Javadoc node) {
1987        // default implementation: do nothing
1988
}
1989
1990    /**
1991     * End of visit the given type-specific AST node.
1992     * <p>
1993     * The default implementation does nothing. Subclasses may reimplement.
1994     * </p>
1995     *
1996     * @param node the node to visit
1997     */

1998    public void endVisit(LabeledStatement node) {
1999        // default implementation: do nothing
2000
}
2001    
2002    /**
2003     * End of visit the given type-specific AST node.
2004     * <p>
2005     * The default implementation does nothing. Subclasses may reimplement.
2006     * </p>
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.
2011     * </p>
2012     *
2013     * @param node the node to visit
2014     * @since 3.0
2015     */

2016    public void endVisit(LineComment node) {
2017        // default implementation: do nothing
2018
}
2019    
2020    /**
2021     * End of visit the given type-specific AST node.
2022     * <p>
2023     * The default implementation does nothing. Subclasses may reimplement.
2024     * </p>
2025     *
2026     * @param node the node to visit
2027     * @since 3.1
2028     */

2029    public void endVisit(MarkerAnnotation node) {
2030        // default implementation: do nothing
2031
}
2032    
2033    /**
2034     * End of visit the given type-specific AST node.
2035     * <p>
2036     * The default implementation does nothing. Subclasses may reimplement.
2037     * </p>
2038     *
2039     * @param node the node to visit
2040     * @since 3.0
2041     */

2042    public void endVisit(MemberRef node) {
2043        // default implementation: do nothing
2044
}
2045    
2046    /**
2047     * End of visit the given type-specific AST node.
2048     * <p>
2049     * The default implementation does nothing. Subclasses may reimplement.
2050     * </p>
2051     *
2052     * @param node the node to visit
2053     * @since 3.1
2054     */

2055    public void endVisit(MemberValuePair node) {
2056        // default implementation: do nothing
2057
}
2058    
2059    /**
2060     * End of visit the given type-specific AST node.
2061     * <p>
2062     * The default implementation does nothing. Subclasses may reimplement.
2063     * </p>
2064     *
2065     * @param node the node to visit
2066     * @since 3.0
2067     */

2068    public void endVisit(MethodRef node) {
2069        // default implementation: do nothing
2070
}
2071    
2072    /**
2073     * End of visit the given type-specific AST node.
2074     * <p>
2075     * The default implementation does nothing. Subclasses may reimplement.
2076     * </p>
2077     *
2078     * @param node the node to visit
2079     * @since 3.0
2080     */

2081    public void endVisit(MethodRefParameter node) {
2082        // default implementation: do nothing
2083
}
2084
2085    /**
2086     * End of visit the given type-specific AST node.
2087     * <p>
2088     * The default implementation does nothing. Subclasses may reimplement.
2089     * </p>
2090     *
2091     * @param node the node to visit
2092     */

2093    public void endVisit(MethodDeclaration node) {
2094        // default implementation: do nothing
2095
}
2096
2097    /**
2098     * End of visit the given type-specific AST node.
2099     * <p>
2100     * The default implementation does nothing. Subclasses may reimplement.
2101     * </p>
2102     *
2103     * @param node the node to visit
2104     */

2105    public void endVisit(MethodInvocation node) {
2106        // default implementation: do nothing
2107
}
2108    
2109    /**
2110     * End of visit the given type-specific AST node.
2111     * <p>
2112     * The default implementation does nothing. Subclasses may reimplement.
2113     * </p>
2114     *
2115     * @param node the node to visit
2116     * @since 3.1
2117     */

2118    public void endVisit(Modifier node) {
2119        // default implementation: do nothing
2120
}
2121    
2122    /**
2123     * End of visit the given type-specific AST node.
2124     * <p>
2125     * The default implementation does nothing. Subclasses may reimplement.
2126     * </p>
2127     *
2128     * @param node the node to visit
2129     * @since 3.1
2130     */

2131    public void endVisit(NormalAnnotation node) {
2132        // default implementation: do nothing
2133
}
2134
2135    /**
2136     * End of visit the given type-specific AST node.
2137     * <p>
2138     * The default implementation does nothing. Subclasses may reimplement.
2139     * </p>
2140     *
2141     * @param node the node to visit
2142     */

2143    public void endVisit(NullLiteral node) {
2144        // default implementation: do nothing
2145
}
2146
2147    /**
2148     * End of visit the given type-specific AST node.
2149     * <p>
2150     * The default implementation does nothing. Subclasses may reimplement.
2151     * </p>
2152     *
2153     * @param node the node to visit
2154     */

2155    public void endVisit(NumberLiteral node) {
2156        // default implementation: do nothing
2157
}
2158
2159    /**
2160     * End of visit the given type-specific AST node.
2161     * <p>
2162     * The default implementation does nothing. Subclasses may reimplement.
2163     * </p>
2164     *
2165     * @param node the node to visit
2166     */

2167    public void endVisit(PackageDeclaration node) {
2168        // default implementation: do nothing
2169
}
2170    
2171    /**
2172     * End of visit the given type-specific AST node.
2173     * <p>
2174     * The default implementation does nothing. Subclasses may reimplement.
2175     * </p>
2176     *
2177     * @param node the node to visit
2178     * @since 3.1
2179     */

2180    public void endVisit(ParameterizedType node) {
2181        // default implementation: do nothing
2182
}
2183
2184    /**
2185     * End of visit the given type-specific AST node.
2186     * <p>
2187     * The default implementation does nothing. Subclasses may reimplement.
2188     * </p>
2189     *
2190     * @param node the node to visit
2191     */

2192    public void endVisit(ParenthesizedExpression node) {
2193        // default implementation: do nothing
2194
}
2195
2196    /**
2197     * End of visit the given type-specific AST node.
2198     * <p>
2199     * The default implementation does nothing. Subclasses may reimplement.
2200     * </p>
2201     *
2202     * @param node the node to visit
2203     */

2204    public void endVisit(PostfixExpression node) {
2205        // default implementation: do nothing
2206
}
2207
2208    /**
2209     * End of visit the given type-specific AST node.
2210     * <p>
2211     * The default implementation does nothing. Subclasses may reimplement.
2212     * </p>
2213     *
2214     * @param node the node to visit
2215     */

2216    public void endVisit(PrefixExpression node) {
2217        // default implementation: do nothing
2218
}
2219
2220    /**
2221     * End of visit the given type-specific AST node.
2222     * <p>
2223     * The default implementation does nothing. Subclasses may reimplement.
2224     * </p>
2225     *
2226     * @param node the node to visit
2227     */

2228    public void endVisit(PrimitiveType node) {
2229        // default implementation: do nothing
2230
}
2231
2232    /**
2233     * End of visit the given type-specific AST node.
2234     * <p>
2235     * The default implementation does nothing. Subclasses may reimplement.
2236     * </p>
2237     *
2238     * @param node the node to visit
2239     */

2240    public void endVisit(QualifiedName node) {
2241        // default implementation: do nothing
2242
}
2243    
2244    /**
2245     * End of visit the given type-specific AST node.
2246     * <p>
2247     * The default implementation does nothing. Subclasses may reimplement.
2248     * </p>
2249     *
2250     * @param node the node to visit
2251     * @since 3.1
2252     */

2253    public void endVisit(QualifiedType node) {
2254        // default implementation: do nothing
2255
}
2256
2257    /**
2258     * End of visit the given type-specific AST node.
2259     * <p>
2260     * The default implementation does nothing. Subclasses may reimplement.
2261     * </p>
2262     *
2263     * @param node the node to visit
2264     */

2265    public void endVisit(ReturnStatement node) {
2266        // default implementation: do nothing
2267
}
2268
2269    /**
2270     * End of visit the given type-specific AST node.
2271     * <p>
2272     * The default implementation does nothing. Subclasses may reimplement.
2273     * </p>
2274     *
2275     * @param node the node to visit
2276     */

2277    public void endVisit(SimpleName node) {
2278        // default implementation: do nothing
2279
}
2280
2281    /**
2282     * End of visit the given type-specific AST node.
2283     * <p>
2284     * The default implementation does nothing. Subclasses may reimplement.
2285     * </p>
2286     *
2287     * @param node the node to visit
2288     */

2289    public void endVisit(SimpleType node) {
2290        // default implementation: do nothing
2291
}
2292    
2293    /**
2294     * End of visit the given type-specific AST node.
2295     * <p>
2296     * The default implementation does nothing. Subclasses may reimplement.
2297     * </p>
2298     *
2299     * @param node the node to visit
2300     * @since 3.1
2301     */

2302    public void endVisit(SingleMemberAnnotation node) {
2303        // default implementation: do nothing
2304
}
2305
2306    /**
2307     * End of visit the given type-specific AST node.
2308     * <p>
2309     * The default implementation does nothing. Subclasses may reimplement.
2310     * </p>
2311     *
2312     * @param node the node to visit
2313     */

2314    public void endVisit(SingleVariableDeclaration node) {
2315        // default implementation: do nothing
2316
}
2317
2318    /**
2319     * End of visit the given type-specific AST node.
2320     * <p>
2321     * The default implementation does nothing. Subclasses may reimplement.
2322     * </p>
2323     *
2324     * @param node the node to visit
2325     */

2326    public void endVisit(StringLiteral node) {
2327        // default implementation: do nothing
2328
}
2329
2330    /**
2331     * End of visit the given type-specific AST node.
2332     * <p>
2333     * The default implementation does nothing. Subclasses may reimplement.
2334     * </p>
2335     *
2336     * @param node the node to visit
2337     */

2338    public void endVisit(SuperConstructorInvocation node) {
2339        // default implementation: do nothing
2340
}
2341
2342    /**
2343     * End of visit the given type-specific AST node.
2344     * <p>
2345     * The default implementation does nothing. Subclasses may reimplement.
2346     * </p>
2347     *
2348     * @param node the node to visit
2349     */

2350    public void endVisit(SuperFieldAccess node) {
2351        // default implementation: do nothing
2352
}
2353
2354    /**
2355     * End of visit the given type-specific AST node.
2356     * <p>
2357     * The default implementation does nothing. Subclasses may reimplement.
2358     * </p>
2359     *
2360     * @param node the node to visit
2361     */

2362    public void endVisit(SuperMethodInvocation node) {
2363        // default implementation: do nothing
2364
}
2365
2366    /**
2367     * End of visit the given type-specific AST node.
2368     * <p>
2369     * The default implementation does nothing. Subclasses may reimplement.
2370     * </p>
2371     *
2372     * @param node the node to visit
2373     */

2374    public void endVisit(SwitchCase node) {
2375        // default implementation: do nothing
2376
}
2377
2378    /**
2379     * End of visit the given type-specific AST node.
2380     * <p>
2381     * The default implementation does nothing. Subclasses may reimplement.
2382     * </p>
2383     *
2384     * @param node the node to visit
2385     */

2386    public void endVisit(SwitchStatement node) {
2387        // default implementation: do nothing
2388
}
2389
2390    /**
2391     * End of visit the given type-specific AST node.
2392     * <p>
2393     * The default implementation does nothing. Subclasses may reimplement.
2394     * </p>
2395     *
2396     * @param node the node to visit
2397     */

2398    public void endVisit(SynchronizedStatement node) {
2399        // default implementation: do nothing
2400
}
2401    
2402    /**
2403     * End of visit the given type-specific AST node.
2404     * <p>
2405     * The default implementation does nothing. Subclasses may reimplement.
2406     * </p>
2407     *
2408     * @param node the node to visit
2409     * @since 3.0
2410     */

2411    public void endVisit(TagElement node) {
2412        // default implementation: do nothing
2413
}
2414    
2415    /**
2416     * End of visit the given type-specific AST node.
2417     * <p>
2418     * The default implementation does nothing. Subclasses may reimplement.
2419     * </p>
2420     *
2421     * @param node the node to visit
2422     * @since 3.0
2423     */

2424    public void endVisit(TextElement node) {
2425        // default implementation: do nothing
2426
}
2427
2428    /**
2429     * End of visit the given type-specific AST node.
2430     * <p>
2431     * The default implementation does nothing. Subclasses may reimplement.
2432     * </p>
2433     *
2434     * @param node the node to visit
2435     */

2436    public void endVisit(ThisExpression node) {
2437        // default implementation: do nothing
2438
}
2439
2440    /**
2441     * End of visit the given type-specific AST node.
2442     * <p>
2443     * The default implementation does nothing. Subclasses may reimplement.
2444     * </p>
2445     *
2446     * @param node the node to visit
2447     */

2448    public void endVisit(ThrowStatement node) {
2449        // default implementation: do nothing
2450
}
2451
2452    /**
2453     * End of visit the given type-specific AST node.
2454     * <p>
2455     * The default implementation does nothing. Subclasses may reimplement.
2456     * </p>
2457     *
2458     * @param node the node to visit
2459     */

2460    public void endVisit(TryStatement node) {
2461        // default implementation: do nothing
2462
}
2463
2464    /**
2465     * End of visit the given type-specific AST node.
2466     * <p>
2467     * The default implementation does nothing. Subclasses may reimplement.
2468     * </p>
2469     *
2470     * @param node the node to visit
2471     */

2472    public void endVisit(TypeDeclaration node) {
2473        // default implementation: do nothing
2474
}
2475
2476    /**
2477     * End of visit the given type-specific AST node.
2478     * <p>
2479     * The default implementation does nothing. Subclasses may reimplement.
2480     * </p>
2481     *
2482     * @param node the node to visit
2483     */

2484    public void endVisit(TypeDeclarationStatement node) {
2485        // default implementation: do nothing
2486
}
2487
2488    /**
2489     * End of visit the given type-specific AST node.
2490     * <p>
2491     * The default implementation does nothing. Subclasses may reimplement.
2492     * </p>
2493     *
2494     * @param node the node to visit
2495     */

2496    public void endVisit(TypeLiteral node) {
2497        // default implementation: do nothing
2498
}
2499    
2500    /**
2501     * End of visit the given type-specific AST node.
2502     * <p>
2503     * The default implementation does nothing. Subclasses may reimplement.
2504     * </p>
2505     *
2506     * @param node the node to visit
2507     * @since 3.1
2508     */

2509    public void endVisit(TypeParameter node) {
2510        // default implementation: do nothing
2511
}
2512
2513    /**
2514     * End of visit the given type-specific AST node.
2515     * <p>
2516     * The default implementation does nothing. Subclasses may reimplement.
2517     * </p>
2518     *
2519     * @param node the node to visit
2520     */

2521    public void endVisit(VariableDeclarationExpression node) {
2522        // default implementation: do nothing
2523
}
2524
2525    /**
2526     * End of visit the given type-specific AST node.
2527     * <p>
2528     * The default implementation does nothing. Subclasses may reimplement.
2529     * </p>
2530     *
2531     * @param node the node to visit
2532     */

2533    public void endVisit(VariableDeclarationStatement node) {
2534        // default implementation: do nothing
2535
}
2536
2537    /**
2538     * End of visit the given type-specific AST node.
2539     * <p>
2540     * The default implementation does nothing. Subclasses may reimplement.
2541     * </p>
2542     *
2543     * @param node the node to visit
2544     */

2545    public void endVisit(VariableDeclarationFragment node) {
2546        // default implementation: do nothing
2547
}
2548
2549    /**
2550     * End of visit the given type-specific AST node.
2551     * <p>
2552     * The default implementation does nothing. Subclasses may reimplement.
2553     * </p>
2554     *
2555     * @param node the node to visit
2556     */

2557    public void endVisit(WhileStatement node) {
2558        // default implementation: do nothing
2559
}
2560    
2561    /**
2562     * End of visit the given type-specific AST node.
2563     * <p>
2564     * The default implementation does nothing. Subclasses may reimplement.
2565     * </p>
2566     *
2567     * @param node the node to visit
2568     * @since 3.1
2569     */

2570    public void endVisit(WildcardType node) {
2571        // default implementation: do nothing
2572
}
2573}
2574
Popular Tags