001: /***
002: * Retrotranslator: a Java bytecode transformer that translates Java classes
003: * compiled with JDK 5.0 into classes that can be run on JVM 1.4.
004: *
005: * Copyright (c) 2005 - 2008 Taras Puchko
006: * All rights reserved.
007: *
008: * Redistribution and use in source and binary forms, with or without
009: * modification, are permitted provided that the following conditions
010: * are met:
011: * 1. Redistributions of source code must retain the above copyright
012: * notice, this list of conditions and the following disclaimer.
013: * 2. Redistributions in binary form must reproduce the above copyright
014: * notice, this list of conditions and the following disclaimer in the
015: * documentation and/or other materials provided with the distribution.
016: * 3. Neither the name of the copyright holders nor the names of its
017: * contributors may be used to endorse or promote products derived from
018: * this software without specific prior written permission.
019: *
020: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
021: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
022: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
023: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
024: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
025: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
026: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
027: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
028: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
029: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
030: * THE POSSIBILITY OF SUCH DAMAGE.
031: */package net.sf.retrotranslator.runtime.impl;
032:
033: import net.sf.retrotranslator.runtime.asm.*;
034: import net.sf.retrotranslator.runtime.asm.signature.SignatureVisitor;
035:
036: /**
037: * @author Taras Puchko
038: */
039: public class EmptyVisitor implements ClassVisitor, FieldVisitor,
040: MethodVisitor, AnnotationVisitor, SignatureVisitor {
041:
042: public void visit(int version, int access, String name,
043: String signature, String super Name, String[] interfaces) {
044: }
045:
046: public void visitSource(String source, String debug) {
047: }
048:
049: public void visitOuterClass(String owner, String name, String desc) {
050: }
051:
052: public AnnotationVisitor visitAnnotation(String desc,
053: boolean visible) {
054: return this ;
055: }
056:
057: public void visitAttribute(Attribute attr) {
058: }
059:
060: public void visitInnerClass(String name, String outerName,
061: String innerName, int access) {
062: }
063:
064: public FieldVisitor visitField(int access, String name,
065: String desc, String signature, Object value) {
066: return this ;
067: }
068:
069: public MethodVisitor visitMethod(int access, String name,
070: String desc, String signature, String[] exceptions) {
071: return this ;
072: }
073:
074: public void visitEnd() {
075: }
076:
077: public AnnotationVisitor visitAnnotationDefault() {
078: return this ;
079: }
080:
081: public AnnotationVisitor visitParameterAnnotation(int parameter,
082: String desc, boolean visible) {
083: return this ;
084: }
085:
086: public void visitCode() {
087: }
088:
089: public void visitInsn(int opcode) {
090: }
091:
092: public void visitIntInsn(int opcode, int operand) {
093: }
094:
095: public void visitVarInsn(int opcode, int var) {
096: }
097:
098: public void visitTypeInsn(int opcode, String desc) {
099: }
100:
101: public void visitFieldInsn(int opcode, String owner, String name,
102: String desc) {
103: }
104:
105: public void visitMethodInsn(int opcode, String owner, String name,
106: String desc) {
107: }
108:
109: public void visitJumpInsn(int opcode, Label label) {
110: }
111:
112: public void visitLabel(Label label) {
113: }
114:
115: public void visitLdcInsn(Object cst) {
116: }
117:
118: public void visitIincInsn(int var, int increment) {
119: }
120:
121: public void visitTableSwitchInsn(int min, int max, Label dflt,
122: Label labels[]) {
123: }
124:
125: public void visitLookupSwitchInsn(Label dflt, int keys[],
126: Label labels[]) {
127: }
128:
129: public void visitMultiANewArrayInsn(String desc, int dims) {
130: }
131:
132: public void visitTryCatchBlock(Label start, Label end,
133: Label handler, String type) {
134: }
135:
136: public void visitLocalVariable(String name, String desc,
137: String signature, Label start, Label end, int index) {
138: }
139:
140: public void visitLineNumber(int line, Label start) {
141: }
142:
143: public void visitMaxs(int maxStack, int maxLocals) {
144: }
145:
146: public void visit(String name, Object value) {
147: }
148:
149: public void visitEnum(String name, String desc, String value) {
150: }
151:
152: public AnnotationVisitor visitAnnotation(String name, String desc) {
153: return this ;
154: }
155:
156: public AnnotationVisitor visitArray(String name) {
157: return this ;
158: }
159:
160: public void visitFormalTypeParameter(String name) {
161: }
162:
163: public SignatureVisitor visitClassBound() {
164: return this ;
165: }
166:
167: public SignatureVisitor visitInterfaceBound() {
168: return this ;
169: }
170:
171: public SignatureVisitor visitSuperclass() {
172: return this ;
173: }
174:
175: public SignatureVisitor visitInterface() {
176: return this ;
177: }
178:
179: public SignatureVisitor visitParameterType() {
180: return this ;
181: }
182:
183: public SignatureVisitor visitReturnType() {
184: return this ;
185: }
186:
187: public SignatureVisitor visitExceptionType() {
188: return this ;
189: }
190:
191: public void visitBaseType(char descriptor) {
192: }
193:
194: public void visitTypeVariable(String name) {
195: }
196:
197: public SignatureVisitor visitArrayType() {
198: return this ;
199: }
200:
201: public void visitClassType(String name) {
202: }
203:
204: public void visitInnerClassType(String name) {
205: }
206:
207: public void visitTypeArgument() {
208: }
209:
210: public SignatureVisitor visitTypeArgument(char wildcard) {
211: return this;
212: }
213:
214: }
|