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.drools.asm.commons;
030:
031: import org.drools.asm.AnnotationVisitor;
032: import org.drools.asm.Attribute;
033: import org.drools.asm.ClassVisitor;
034: import org.drools.asm.FieldVisitor;
035: import org.drools.asm.Label;
036: import org.drools.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 visitInsn(final int opcode) {
100: }
101:
102: public void visitIntInsn(final int opcode, final int operand) {
103: }
104:
105: public void visitVarInsn(final int opcode, final int var) {
106: }
107:
108: public void visitTypeInsn(final int opcode, final String desc) {
109: }
110:
111: public void visitFieldInsn(final int opcode, final String owner,
112: final String name, final String desc) {
113: }
114:
115: public void visitMethodInsn(final int opcode, final String owner,
116: final String name, final String desc) {
117: }
118:
119: public void visitJumpInsn(final int opcode, final Label label) {
120: }
121:
122: public void visitLabel(final Label label) {
123: }
124:
125: public void visitLdcInsn(final Object cst) {
126: }
127:
128: public void visitIincInsn(final int var, final int increment) {
129: }
130:
131: public void visitTableSwitchInsn(final int min, final int max,
132: final Label dflt, final Label labels[]) {
133: }
134:
135: public void visitLookupSwitchInsn(final Label dflt,
136: final int keys[], final Label labels[]) {
137: }
138:
139: public void visitMultiANewArrayInsn(final String desc,
140: final int dims) {
141: }
142:
143: public void visitTryCatchBlock(final Label start, final Label end,
144: final Label handler, final String type) {
145: }
146:
147: public void visitLocalVariable(final String name,
148: final String desc, final String signature,
149: final Label start, final Label end, final int index) {
150: }
151:
152: public void visitLineNumber(final int line, final Label start) {
153: }
154:
155: public void visitMaxs(final int maxStack, final int maxLocals) {
156: }
157:
158: public void visit(final String name, final Object value) {
159: }
160:
161: public void visitEnum(final String name, final String desc,
162: final String value) {
163: }
164:
165: public AnnotationVisitor visitAnnotation(final String name,
166: final String desc) {
167: return this ;
168: }
169:
170: public AnnotationVisitor visitArray(final String name) {
171: return this;
172: }
173: }
|