org.objectweb.asm.commons

Class EmptyVisitor

Implemented Interfaces:
AnnotationVisitor, ClassVisitor, FieldVisitor, MethodVisitor

public class EmptyVisitor
extends Object
implements ClassVisitor, FieldVisitor, MethodVisitor, AnnotationVisitor

An empty implementation of the ASM visitor interfaces.
Author:
Eric Bruneton

Method Summary

void
visit(String name, Object value)
Visits a primitive value of the annotation.
void
visit(int version, int access, String name, String signature, String superName, String[] interfaces)
AnnotationVisitor
visitAnnotation(String name, String desc)
Visits a nested annotation value of the annotation.
AnnotationVisitor
visitAnnotation(String desc, boolean visible)
AnnotationVisitor
visitAnnotationDefault()
AnnotationVisitor
visitArray(String name)
Visits an array value of the annotation.
void
visitAttribute(Attribute attr)
void
visitCode()
void
visitEnd()
Visits the end of the annotation.
void
visitEnum(String name, String desc, String value)
Visits an enumeration value of the annotation.
FieldVisitor
visitField(int access, String name, String desc, String signature, Object value)
void
visitFieldInsn(int opcode, String owner, String name, String desc)
void
visitIincInsn(int var, int increment)
void
visitInnerClass(String name, String outerName, String innerName, int access)
void
visitInsn(int opcode)
void
visitIntInsn(int opcode, int operand)
void
visitJumpInsn(int opcode, Label label)
void
visitLabel(Label label)
void
visitLdcInsn(Object cst)
void
visitLineNumber(int line, Label start)
void
visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index)
void
visitLookupSwitchInsn(Label dflt, keys[] , labels[] )
void
visitMaxs(int maxStack, int maxLocals)
MethodVisitor
visitMethod(int access, String name, String desc, String signature, String[] exceptions)
void
visitMethodInsn(int opcode, String owner, String name, String desc)
void
visitMultiANewArrayInsn(String desc, int dims)
void
visitOuterClass(String owner, String name, String desc)
AnnotationVisitor
visitParameterAnnotation(int parameter, String desc, boolean visible)
void
visitSource(String source, String debug)
void
visitTableSwitchInsn(int min, int max, Label dflt, labels[] )
void
visitTryCatchBlock(Label start, Label end, Label handler, String type)
void
visitTypeInsn(int opcode, String desc)
void
visitVarInsn(int opcode, int var)

Method Details

visit

public void visit(String name,
                  Object value)
Visits a primitive value of the annotation.
Specified by:
visit in interface AnnotationVisitor
Parameters:
name - the value name.
value - the actual value, whose type must be Byte, Boolean, Character, Short, Integer, Long, Float, Double, String or Type.

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)
Specified by:
visit in interface ClassVisitor

visitAnnotation

public AnnotationVisitor visitAnnotation(String name,
                                         String desc)
Visits a nested annotation value of the annotation.
Specified by:
visitAnnotation in interface AnnotationVisitor
Parameters:
name - the value name.
desc - the class descriptor of the nested annotation class.
Returns:
a non null visitor to visit the actual nested annotation value. The nested annotation value must be fully visited before calling other methods on this annotation visitor.

visitAnnotation

public AnnotationVisitor visitAnnotation(String desc,
                                         boolean visible)
Specified by:
visitAnnotation in interface ClassVisitor
visitAnnotation in interface FieldVisitor
visitAnnotation in interface MethodVisitor

visitAnnotationDefault

public AnnotationVisitor visitAnnotationDefault()
Specified by:
visitAnnotationDefault in interface MethodVisitor

visitArray

public AnnotationVisitor visitArray(String name)
Visits an array value of the annotation.
Specified by:
visitArray in interface AnnotationVisitor
Parameters:
name - the value name.
Returns:
a non null visitor to visit the actual array value elements. The 'name' parameters passed to the methods of this visitor are ignored. All the array values must be visited before calling other methods on this annotation visitor.

visitAttribute

public void visitAttribute(Attribute attr)
Specified by:
visitAttribute in interface ClassVisitor
visitAttribute in interface FieldVisitor
visitAttribute in interface MethodVisitor

visitCode

public void visitCode()
Specified by:
visitCode in interface MethodVisitor

visitEnd

public void visitEnd()
Visits the end of the annotation.
Specified by:
visitEnd in interface ClassVisitor
visitEnd in interface FieldVisitor
visitEnd in interface MethodVisitor
visitEnd in interface AnnotationVisitor

visitEnum

public void visitEnum(String name,
                      String desc,
                      String value)
Visits an enumeration value of the annotation.
Specified by:
visitEnum in interface AnnotationVisitor
Parameters:
name - the value name.
desc - the class descriptor of the enumeration class.
value - the actual enumeration value.

visitField

public FieldVisitor visitField(int access,
                               String name,
                               String desc,
                               String signature,
                               Object value)
Specified by:
visitField in interface ClassVisitor

visitFieldInsn

public void visitFieldInsn(int opcode,
                           String owner,
                           String name,
                           String desc)
Specified by:
visitFieldInsn in interface MethodVisitor

visitIincInsn

public void visitIincInsn(int var,
                          int increment)
Specified by:
visitIincInsn in interface MethodVisitor

visitInnerClass

public void visitInnerClass(String name,
                            String outerName,
                            String innerName,
                            int access)
Specified by:
visitInnerClass in interface ClassVisitor

visitInsn

public void visitInsn(int opcode)
Specified by:
visitInsn in interface MethodVisitor

visitIntInsn

public void visitIntInsn(int opcode,
                         int operand)
Specified by:
visitIntInsn in interface MethodVisitor

visitJumpInsn

public void visitJumpInsn(int opcode,
                          Label label)
Specified by:
visitJumpInsn in interface MethodVisitor

visitLabel

public void visitLabel(Label label)
Specified by:
visitLabel in interface MethodVisitor

visitLdcInsn

public void visitLdcInsn(Object cst)
Specified by:
visitLdcInsn in interface MethodVisitor

visitLineNumber

public void visitLineNumber(int line,
                            Label start)
Specified by:
visitLineNumber in interface MethodVisitor

visitLocalVariable

public void visitLocalVariable(String name,
                               String desc,
                               String signature,
                               Label start,
                               Label end,
                               int index)
Specified by:
visitLocalVariable in interface MethodVisitor

visitLookupSwitchInsn

public void visitLookupSwitchInsn(Label dflt,
                                  keys[] ,
                                  labels[] )
Specified by:
visitLookupSwitchInsn in interface MethodVisitor

visitMaxs

public void visitMaxs(int maxStack,
                      int maxLocals)
Specified by:
visitMaxs in interface MethodVisitor

visitMethod

public MethodVisitor visitMethod(int access,
                                 String name,
                                 String desc,
                                 String signature,
                                 String[] exceptions)
Specified by:
visitMethod in interface ClassVisitor

visitMethodInsn

public void visitMethodInsn(int opcode,
                            String owner,
                            String name,
                            String desc)
Specified by:
visitMethodInsn in interface MethodVisitor

visitMultiANewArrayInsn

public void visitMultiANewArrayInsn(String desc,
                                    int dims)
Specified by:
visitMultiANewArrayInsn in interface MethodVisitor

visitOuterClass

public void visitOuterClass(String owner,
                            String name,
                            String desc)
Specified by:
visitOuterClass in interface ClassVisitor

visitParameterAnnotation

public AnnotationVisitor visitParameterAnnotation(int parameter,
                                                  String desc,
                                                  boolean visible)
Specified by:
visitParameterAnnotation in interface MethodVisitor

visitSource

public void visitSource(String source,
                        String debug)
Specified by:
visitSource in interface ClassVisitor

visitTableSwitchInsn

public void visitTableSwitchInsn(int min,
                                 int max,
                                 Label dflt,
                                 labels[] )
Specified by:
visitTableSwitchInsn in interface MethodVisitor

visitTryCatchBlock

public void visitTryCatchBlock(Label start,
                               Label end,
                               Label handler,
                               String type)
Specified by:
visitTryCatchBlock in interface MethodVisitor

visitTypeInsn

public void visitTypeInsn(int opcode,
                          String desc)
Specified by:
visitTypeInsn in interface MethodVisitor

visitVarInsn

public void visitVarInsn(int opcode,
                         int var)
Specified by:
visitVarInsn in interface MethodVisitor