KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > asm > commons > EmptyVisitor


1 /***
2  * ASM: a very small and fast Java bytecode manipulation framework
3  * Copyright (c) 2000-2005 INRIA, France Telecom
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * 3. Neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28  * THE POSSIBILITY OF SUCH DAMAGE.
29  */

30 package org.objectweb.asm.commons;
31
32 import org.objectweb.asm.AnnotationVisitor;
33 import org.objectweb.asm.Attribute;
34 import org.objectweb.asm.ClassVisitor;
35 import org.objectweb.asm.FieldVisitor;
36 import org.objectweb.asm.Label;
37 import org.objectweb.asm.MethodVisitor;
38
39 /**
40  * An empty implementation of the ASM visitor interfaces.
41  *
42  * @author Eric Bruneton
43  */

44 public class EmptyVisitor implements
45         ClassVisitor,
46         FieldVisitor,
47         MethodVisitor,
48         AnnotationVisitor
49 {
50
51     public void visit(
52         int version,
53         int access,
54         String JavaDoc name,
55         String JavaDoc signature,
56         String JavaDoc superName,
57         String JavaDoc[] interfaces)
58     {
59     }
60
61     public void visitSource(String JavaDoc source, String JavaDoc debug) {
62     }
63
64     public void visitOuterClass(String JavaDoc owner, String JavaDoc name, String JavaDoc desc) {
65     }
66
67     public AnnotationVisitor visitAnnotation(String JavaDoc desc, boolean visible) {
68         return this;
69     }
70
71     public void visitAttribute(Attribute attr) {
72     }
73
74     public void visitInnerClass(
75         String JavaDoc name,
76         String JavaDoc outerName,
77         String JavaDoc innerName,
78         int access)
79     {
80     }
81
82     public FieldVisitor visitField(
83         int access,
84         String JavaDoc name,
85         String JavaDoc desc,
86         String JavaDoc signature,
87         Object JavaDoc value)
88     {
89         return this;
90     }
91
92     public MethodVisitor visitMethod(
93         int access,
94         String JavaDoc name,
95         String JavaDoc desc,
96         String JavaDoc signature,
97         String JavaDoc[] exceptions)
98     {
99         return this;
100     }
101
102     public void visitEnd() {
103     }
104
105     public AnnotationVisitor visitAnnotationDefault() {
106         return this;
107     }
108
109     public AnnotationVisitor visitParameterAnnotation(
110         int parameter,
111         String JavaDoc desc,
112         boolean visible)
113     {
114         return this;
115     }
116
117     public void visitCode() {
118     }
119
120     public void visitInsn(int opcode) {
121     }
122
123     public void visitIntInsn(int opcode, int operand) {
124     }
125
126     public void visitVarInsn(int opcode, int var) {
127     }
128
129     public void visitTypeInsn(int opcode, String JavaDoc desc) {
130     }
131
132     public void visitFieldInsn(
133         int opcode,
134         String JavaDoc owner,
135         String JavaDoc name,
136         String JavaDoc desc)
137     {
138     }
139
140     public void visitMethodInsn(
141         int opcode,
142         String JavaDoc owner,
143         String JavaDoc name,
144         String JavaDoc desc)
145     {
146     }
147
148     public void visitJumpInsn(int opcode, Label label) {
149     }
150
151     public void visitLabel(Label label) {
152     }
153
154     public void visitLdcInsn(Object JavaDoc cst) {
155     }
156
157     public void visitIincInsn(int var, int increment) {
158     }
159
160     public void visitTableSwitchInsn(
161         int min,
162         int max,
163         Label dflt,
164         Label labels[])
165     {
166     }
167
168     public void visitLookupSwitchInsn(Label dflt, int keys[], Label labels[]) {
169     }
170
171     public void visitMultiANewArrayInsn(String JavaDoc desc, int dims) {
172     }
173
174     public void visitTryCatchBlock(
175         Label start,
176         Label end,
177         Label handler,
178         String JavaDoc type)
179     {
180     }
181
182     public void visitLocalVariable(
183         String JavaDoc name,
184         String JavaDoc desc,
185         String JavaDoc signature,
186         Label start,
187         Label end,
188         int index)
189     {
190     }
191
192     public void visitLineNumber(int line, Label start) {
193     }
194
195     public void visitMaxs(int maxStack, int maxLocals) {
196     }
197
198     public void visit(String JavaDoc name, Object JavaDoc value) {
199     }
200
201     public void visitEnum(String JavaDoc name, String JavaDoc desc, String JavaDoc value) {
202     }
203
204     public AnnotationVisitor visitAnnotation(String JavaDoc name, String JavaDoc desc) {
205         return this;
206     }
207
208     public AnnotationVisitor visitArray(String JavaDoc name) {
209         return this;
210     }
211 }
212
Popular Tags