KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > vladium > jcd > cls > AbstractClassDefVisitor


1 /* Copyright (C) 2003 Vladimir Roubtsov. All rights reserved.
2  *
3  * This program and the accompanying materials are made available under
4  * the terms of the Common Public License v1.0 which accompanies this distribution,
5  * and is available at http://www.eclipse.org/legal/cpl-v10.html
6  *
7  * $Id: AbstractClassDefVisitor.java,v 1.1.1.1 2004/05/09 16:57:44 vlad_r Exp $
8  */

9 package com.vladium.jcd.cls;
10
11 // ----------------------------------------------------------------------------
12
/**
13  * @author (C) 2001, Vlad Roubtsov
14  */

15 public
16 abstract class AbstractClassDefVisitor implements IClassDefVisitor
17 {
18     // public: ................................................................
19

20     // IClassDefVisitor:
21

22     public Object JavaDoc visit (final ClassDef cls, final Object JavaDoc ctx)
23     {
24         visit (cls.getConstants (), ctx);
25         visit (cls.getInterfaces (), ctx);
26         visit (cls.getFields (), ctx);
27         visit (cls.getMethods (), ctx);
28         visit (cls.getAttributes (), ctx);
29         
30         return ctx;
31     }
32
33     public Object JavaDoc visit (final IAttributeCollection attributes, final Object JavaDoc ctx)
34     {
35         return ctx;
36     }
37
38     public Object JavaDoc visit (final IConstantCollection constants, final Object JavaDoc ctx)
39     {
40         return ctx;
41     }
42
43     public Object JavaDoc visit (final IFieldCollection fields, final Object JavaDoc ctx)
44     {
45         return ctx;
46     }
47
48     public Object JavaDoc visit (final IInterfaceCollection interfaces, final Object JavaDoc ctx)
49     {
50         return ctx;
51     }
52
53     public Object JavaDoc visit (final IMethodCollection methods, final Object JavaDoc ctx)
54     {
55         return ctx;
56     }
57         
58     // protected: .............................................................
59

60     // package: ...............................................................
61

62     // private: ...............................................................
63

64 } // end of class
65
// ----------------------------------------------------------------------------
66
Popular Tags