KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > retrotranslator > runtime > impl > EmptyVisitor


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

32 package net.sf.retrotranslator.runtime.impl;
33
34 import net.sf.retrotranslator.runtime.asm.*;
35 import net.sf.retrotranslator.runtime.asm.signature.SignatureVisitor;
36
37 /**
38  * @author Taras Puchko
39  */

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