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