KickJava   Java API By Example, From Geeks To Geeks.

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


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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.core.dom;
12 /**
13  */

14 class DefaultASTVisitor extends ASTVisitor {
15     /**
16      *
17      */

18     public DefaultASTVisitor() {
19         super();
20     }
21     
22     /**
23      *
24      */

25     public DefaultASTVisitor(boolean visitDocTags) {
26         super(visitDocTags);
27     }
28     
29     public void endVisit(AnnotationTypeDeclaration node) {
30         endVisitNode(node);
31     }
32     
33     public void endVisit(AnnotationTypeMemberDeclaration node) {
34         endVisitNode(node);
35     }
36
37     public void endVisit(AnonymousClassDeclaration node) {
38         endVisitNode(node);
39     }
40     public void endVisit(ArrayAccess node) {
41         endVisitNode(node);
42     }
43     public void endVisit(ArrayCreation node) {
44         endVisitNode(node);
45     }
46     public void endVisit(ArrayInitializer node) {
47         endVisitNode(node);
48     }
49     public void endVisit(ArrayType node) {
50         endVisitNode(node);
51     }
52     public void endVisit(AssertStatement node) {
53         endVisitNode(node);
54     }
55     public void endVisit(Assignment node) {
56         endVisitNode(node);
57     }
58     public void endVisit(Block node) {
59         endVisitNode(node);
60     }
61     /* since 3.0 */
62     public void endVisit(BlockComment node) {
63         endVisitNode(node);
64     }
65     public void endVisit(BooleanLiteral node) {
66         endVisitNode(node);
67     }
68     public void endVisit(BreakStatement node) {
69         endVisitNode(node);
70     }
71     public void endVisit(CastExpression node) {
72         endVisitNode(node);
73     }
74     public void endVisit(CatchClause node) {
75         endVisitNode(node);
76     }
77     public void endVisit(CharacterLiteral node) {
78         endVisitNode(node);
79     }
80     public void endVisit(ClassInstanceCreation node) {
81         endVisitNode(node);
82     }
83     public void endVisit(CompilationUnit node) {
84         endVisitNode(node);
85     }
86     public void endVisit(ConditionalExpression node) {
87         endVisitNode(node);
88     }
89     public void endVisit(ConstructorInvocation node) {
90         endVisitNode(node);
91     }
92     public void endVisit(ContinueStatement node) {
93         endVisitNode(node);
94     }
95     public void endVisit(DoStatement node) {
96         endVisitNode(node);
97     }
98     public void endVisit(EmptyStatement node) {
99         endVisitNode(node);
100     }
101     public void endVisit(EnhancedForStatement node) {
102         endVisitNode(node);
103     }
104     public void endVisit(EnumConstantDeclaration node) {
105         endVisitNode(node);
106     }
107     public void endVisit(EnumDeclaration node) {
108         endVisitNode(node);
109     }
110     public void endVisit(ExpressionStatement node) {
111         endVisitNode(node);
112     }
113     public void endVisit(FieldAccess node) {
114         endVisitNode(node);
115     }
116     public void endVisit(FieldDeclaration node) {
117         endVisitNode(node);
118     }
119     public void endVisit(ForStatement node) {
120         endVisitNode(node);
121     }
122     public void endVisit(IfStatement node) {
123         endVisitNode(node);
124     }
125     public void endVisit(ImportDeclaration node) {
126         endVisitNode(node);
127     }
128     public void endVisit(InfixExpression node) {
129         endVisitNode(node);
130     }
131     public void endVisit(Initializer node) {
132         endVisitNode(node);
133     }
134     public void endVisit(InstanceofExpression node) {
135         endVisitNode(node);
136     }
137     public void endVisit(Javadoc node) {
138         endVisitNode(node);
139     }
140     public void endVisit(LabeledStatement node) {
141         endVisitNode(node);
142     }
143     public void endVisit(LineComment node) {
144         endVisitNode(node);
145     }
146     public void endVisit(MarkerAnnotation node) {
147         endVisitNode(node);
148     }
149     public void endVisit(MemberRef node) {
150         endVisitNode(node);
151     }
152     public void endVisit(MemberValuePair node) {
153         endVisitNode(node);
154     }
155     public void endVisit(MethodDeclaration node) {
156         endVisitNode(node);
157     }
158     public void endVisit(MethodInvocation node) {
159         endVisitNode(node);
160     }
161     public void endVisit(MethodRef node) {
162         endVisitNode(node);
163     }
164     public void endVisit(MethodRefParameter node) {
165         endVisitNode(node);
166     }
167     public void endVisit(NormalAnnotation node) {
168         endVisitNode(node);
169     }
170     public void endVisit(NullLiteral node) {
171         endVisitNode(node);
172     }
173     public void endVisit(NumberLiteral node) {
174         endVisitNode(node);
175     }
176     public void endVisit(PackageDeclaration node) {
177         endVisitNode(node);
178     }
179     public void endVisit(ParameterizedType node) {
180         endVisitNode(node);
181     }
182     public void endVisit(ParenthesizedExpression node) {
183         endVisitNode(node);
184     }
185     public void endVisit(PostfixExpression node) {
186         endVisitNode(node);
187     }
188     public void endVisit(PrefixExpression node) {
189         endVisitNode(node);
190     }
191     public void endVisit(PrimitiveType node) {
192         endVisitNode(node);
193     }
194     public void endVisit(QualifiedName node) {
195         endVisitNode(node);
196     }
197     public void endVisit(QualifiedType node) {
198         endVisitNode(node);
199     }
200     public void endVisit(ReturnStatement node) {
201         endVisitNode(node);
202     }
203     public void endVisit(SimpleName node) {
204         endVisitNode(node);
205     }
206     public void endVisit(SimpleType node) {
207         endVisitNode(node);
208     }
209     public void endVisit(SingleMemberAnnotation node) {
210         endVisitNode(node);
211     }
212     public void endVisit(SingleVariableDeclaration node) {
213         endVisitNode(node);
214     }
215     public void endVisit(StringLiteral node) {
216         endVisitNode(node);
217     }
218     public void endVisit(SuperConstructorInvocation node) {
219         endVisitNode(node);
220     }
221     public void endVisit(SuperFieldAccess node) {
222         endVisitNode(node);
223     }
224     public void endVisit(SuperMethodInvocation node) {
225         endVisitNode(node);
226     }
227
228     public void endVisit(SwitchCase node) {
229         endVisitNode(node);
230     }
231     public void endVisit(SwitchStatement node) {
232         endVisitNode(node);
233     }
234     public void endVisit(SynchronizedStatement node) {
235         endVisitNode(node);
236     }
237     public void endVisit(TagElement node) {
238         endVisitNode(node);
239     }
240     public void endVisit(TextElement node) {
241         endVisitNode(node);
242     }
243     public void endVisit(ThisExpression node) {
244         endVisitNode(node);
245     }
246     public void endVisit(ThrowStatement node) {
247         endVisitNode(node);
248     }
249     public void endVisit(TryStatement node) {
250         endVisitNode(node);
251     }
252
253     public void endVisit(TypeDeclaration node) {
254         endVisitNode(node);
255     }
256     public void endVisit(TypeDeclarationStatement node) {
257         endVisitNode(node);
258     }
259     public void endVisit(TypeLiteral node) {
260         endVisitNode(node);
261     }
262     public void endVisit(TypeParameter node) {
263         endVisitNode(node);
264     }
265     public void endVisit(VariableDeclarationExpression node) {
266         endVisitNode(node);
267     }
268     public void endVisit(VariableDeclarationFragment node) {
269         endVisitNode(node);
270     }
271     public void endVisit(VariableDeclarationStatement node) {
272         endVisitNode(node);
273     }
274     public void endVisit(WhileStatement node) {
275         endVisitNode(node);
276     }
277     public void endVisit(WildcardType node) {
278         endVisitNode(node);
279     }
280     protected void endVisitNode(ASTNode node) {
281         // do nothing
282
}
283     public boolean visit(AnnotationTypeDeclaration node) {
284         return visitNode(node);
285     }
286     public boolean visit(AnnotationTypeMemberDeclaration node) {
287         return visitNode(node);
288     }
289     public boolean visit(AnonymousClassDeclaration node) {
290         return visitNode(node);
291     }
292     public boolean visit(ArrayAccess node) {
293         return visitNode(node);
294     }
295     public boolean visit(ArrayCreation node) {
296         return visitNode(node);
297     }
298     public boolean visit(ArrayInitializer node) {
299         return visitNode(node);
300     }
301     public boolean visit(ArrayType node) {
302         visitNode(node);
303         return false;
304     }
305     public boolean visit(AssertStatement node) {
306         return visitNode(node);
307     }
308     public boolean visit(Assignment node) {
309         return visitNode(node);
310     }
311     public boolean visit(Block node) {
312         return visitNode(node);
313     }
314     /* since 3.0 */
315     public boolean visit(BlockComment node) {
316         return visitNode(node);
317     }
318     public boolean visit(BooleanLiteral node) {
319         return visitNode(node);
320     }
321     public boolean visit(BreakStatement node) {
322         return visitNode(node);
323     }
324     public boolean visit(CastExpression node) {
325         return visitNode(node);
326     }
327     public boolean visit(CatchClause node) {
328         return visitNode(node);
329     }
330     public boolean visit(CharacterLiteral node) {
331         return visitNode(node);
332     }
333     public boolean visit(ClassInstanceCreation node) {
334         return visitNode(node);
335     }
336     public boolean visit(CompilationUnit node) {
337         return visitNode(node);
338     }
339     public boolean visit(ConditionalExpression node) {
340         return visitNode(node);
341     }
342     public boolean visit(ConstructorInvocation node) {
343         return visitNode(node);
344     }
345     public boolean visit(ContinueStatement node) {
346         return visitNode(node);
347     }
348     public boolean visit(DoStatement node) {
349         return visitNode(node);
350     }
351     public boolean visit(EmptyStatement node) {
352         return visitNode(node);
353     }
354     public boolean visit(EnhancedForStatement node) {
355         return visitNode(node);
356     }
357     public boolean visit(EnumConstantDeclaration node) {
358         return visitNode(node);
359     }
360     public boolean visit(EnumDeclaration node) {
361         return visitNode(node);
362     }
363     public boolean visit(ExpressionStatement node) {
364         return visitNode(node);
365     }
366     public boolean visit(FieldAccess node) {
367         return visitNode(node);
368     }
369     public boolean visit(FieldDeclaration node) {
370         return visitNode(node);
371     }
372     public boolean visit(ForStatement node) {
373         return visitNode(node);
374     }
375     public boolean visit(IfStatement node) {
376         return visitNode(node);
377     }
378     public boolean visit(ImportDeclaration node) {
379         return visitNode(node);
380     }
381     public boolean visit(InfixExpression node) {
382         return visitNode(node);
383     }
384     public boolean visit(Initializer node) {
385         return visitNode(node);
386     }
387     public boolean visit(InstanceofExpression node) {
388         return visitNode(node);
389     }
390     public boolean visit(Javadoc node) {
391         // do not visit Javadoc tags by default. Use constructor with boolean to enable.
392
if (super.visit(node)) {
393             return visitNode(node);
394         }
395         return false;
396     }
397     public boolean visit(LabeledStatement node) {
398         return visitNode(node);
399     }
400     public boolean visit(LineComment node) {
401         return visitNode(node);
402     }
403     public boolean visit(MarkerAnnotation node) {
404         return visitNode(node);
405     }
406     public boolean visit(MemberRef node) {
407         return visitNode(node);
408     }
409     public boolean visit(MemberValuePair node) {
410         return visitNode(node);
411     }
412     public boolean visit(MethodDeclaration node) {
413         return visitNode(node);
414     }
415     public boolean visit(MethodInvocation node) {
416         return visitNode(node);
417     }
418     public boolean visit(MethodRef node) {
419         return visitNode(node);
420     }
421     public boolean visit(MethodRefParameter node) {
422         return visitNode(node);
423     }
424     public boolean visit(NormalAnnotation node) {
425         return visitNode(node);
426     }
427     public boolean visit(NullLiteral node) {
428         return visitNode(node);
429     }
430     public boolean visit(NumberLiteral node) {
431         return visitNode(node);
432     }
433     public boolean visit(PackageDeclaration node) {
434         return visitNode(node);
435     }
436     public boolean visit(ParameterizedType node) {
437         return visitNode(node);
438     }
439     public boolean visit(ParenthesizedExpression node) {
440         return visitNode(node);
441     }
442     public boolean visit(PostfixExpression node) {
443         return visitNode(node);
444     }
445     public boolean visit(PrefixExpression node) {
446         return visitNode(node);
447     }
448     
449     public boolean visit(PrimitiveType node) {
450         return visitNode(node);
451     }
452     public boolean visit(QualifiedName node) {
453         return visitNode(node);
454     }
455     public boolean visit(QualifiedType node) {
456         return visitNode(node);
457     }
458     public boolean visit(ReturnStatement node) {
459         return visitNode(node);
460     }
461     public boolean visit(SimpleName node) {
462         return visitNode(node);
463     }
464     public boolean visit(SimpleType node) {
465         return visitNode(node);
466     }
467     public boolean visit(SingleMemberAnnotation node) {
468         return visitNode(node);
469     }
470     public boolean visit(SingleVariableDeclaration node) {
471         return visitNode(node);
472     }
473
474     public boolean visit(StringLiteral node) {
475         return visitNode(node);
476     }
477
478     public boolean visit(SuperConstructorInvocation node) {
479         return visitNode(node);
480     }
481
482     public boolean visit(SuperFieldAccess node) {
483         return visitNode(node);
484     }
485
486     public boolean visit(SuperMethodInvocation node) {
487         return visitNode(node);
488     }
489
490     public boolean visit(SwitchCase node) {
491         return visitNode(node);
492     }
493
494     public boolean visit(SwitchStatement node) {
495         return visitNode(node);
496     }
497
498     public boolean visit(SynchronizedStatement node) {
499         return visitNode(node);
500     }
501
502     public boolean visit(TagElement node) {
503         return visitNode(node);
504     }
505
506     public boolean visit(TextElement node) {
507         return visitNode(node);
508     }
509
510     public boolean visit(ThisExpression node) {
511         return visitNode(node);
512     }
513
514     public boolean visit(ThrowStatement node) {
515         return visitNode(node);
516     }
517
518     public boolean visit(TryStatement node) {
519         return visitNode(node);
520     }
521
522     public boolean visit(TypeDeclaration node) {
523         return visitNode(node);
524     }
525
526     public boolean visit(TypeDeclarationStatement node) {
527         return visitNode(node);
528     }
529
530     public boolean visit(TypeLiteral node) {
531         return visitNode(node);
532     }
533
534     public boolean visit(TypeParameter node) {
535         return visitNode(node);
536     }
537
538     public boolean visit(VariableDeclarationExpression node) {
539         return visitNode(node);
540     }
541
542     public boolean visit(VariableDeclarationFragment node) {
543         return visitNode(node);
544     }
545
546     public boolean visit(VariableDeclarationStatement node) {
547         return visitNode(node);
548     }
549
550     public boolean visit(WhileStatement node) {
551         return visitNode(node);
552     }
553
554     public boolean visit(WildcardType node) {
555         return visitNode(node);
556     }
557
558     protected boolean visitNode(ASTNode node) {
559         return true;
560     }
561
562 }
563
Popular Tags