wheel.enhance
Class WheelClassAdapter

java.lang.Object
  extended by wheel.asm.ClassAdapter
      extended by wheel.enhance.WheelClassAdapter
All Implemented Interfaces:
wheel.asm.ClassVisitor, wheel.asm.Opcodes

public class WheelClassAdapter
extends wheel.asm.ClassAdapter
implements wheel.asm.Opcodes


Field Summary
 
Fields inherited from class wheel.asm.ClassAdapter
cv
 
Fields inherited from interface wheel.asm.Opcodes
AALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6
 
Constructor Summary
WheelClassAdapter(wheel.asm.ClassVisitor classVisitor, java.util.Set<java.lang.String> actionRegistry, WheelClassLoader loader)
           
 
Method Summary
 java.util.List<WheelAnnotatedField> getPersistentFields()
           
 void visit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String superName, java.lang.String[] interfaces)
          Visits the header of the class.
 void visitEnd()
          Visits the end of the class.
 wheel.asm.FieldVisitor visitField(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.Object value)
          Visits a field of the class.
 wheel.asm.MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
          Visits a method of the class.
 void visitSource(java.lang.String source, java.lang.String debug)
          Visits the source of the class.
 
Methods inherited from class wheel.asm.ClassAdapter
visitAnnotation, visitAttribute, visitInnerClass, visitOuterClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WheelClassAdapter

public WheelClassAdapter(wheel.asm.ClassVisitor classVisitor,
                         java.util.Set<java.lang.String> actionRegistry,
                         WheelClassLoader loader)
Method Detail

visitField

public wheel.asm.FieldVisitor visitField(int access,
                                         java.lang.String name,
                                         java.lang.String desc,
                                         java.lang.String signature,
                                         java.lang.Object value)
Description copied from interface: wheel.asm.ClassVisitor
Visits a field of the class.

Specified by:
visitField in interface wheel.asm.ClassVisitor
Overrides:
visitField in class wheel.asm.ClassAdapter
Parameters:
access - the field's access flags (see Opcodes). This parameter also indicates if the field is synthetic and/or deprecated.
name - the field's name.
desc - the field's descriptor (see Type).
signature - the field's signature. May be null if the field's type does not use generic types.
value - the field's initial value. This parameter, which may be null if the field does not have an initial value, must be an Integer, a Float, a Long, a Double or a String (for int, float, long or String fields respectively). This parameter is only used for static fields. Its value is ignored for non static fields, which must be initialized through bytecode instructions in constructors or methods.
Returns:
a visitor to visit field annotations and attributes, or null if this class visitor is not interested in visiting these annotations and attributes.

visit

public void visit(int version,
                  int access,
                  java.lang.String name,
                  java.lang.String signature,
                  java.lang.String superName,
                  java.lang.String[] interfaces)
Description copied from interface: wheel.asm.ClassVisitor
Visits the header of the class.

Specified by:
visit in interface wheel.asm.ClassVisitor
Overrides:
visit in class wheel.asm.ClassAdapter
Parameters:
version - the class version.
access - the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated.
name - the internal name of the class (see getInternalName).
signature - the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.
superName - the internal of name of the super class (see getInternalName). For interfaces, the super class is Object. May be null, but only for the Object class.
interfaces - the internal names of the class's interfaces (see getInternalName). May be null.

visitSource

public void visitSource(java.lang.String source,
                        java.lang.String debug)
Description copied from interface: wheel.asm.ClassVisitor
Visits the source of the class.

Specified by:
visitSource in interface wheel.asm.ClassVisitor
Overrides:
visitSource in class wheel.asm.ClassAdapter
Parameters:
source - the name of the source file from which the class was compiled. May be null.
debug - additional debug information to compute the correspondance between source and compiled elements of the class. May be null.

visitMethod

public wheel.asm.MethodVisitor visitMethod(int access,
                                           java.lang.String name,
                                           java.lang.String desc,
                                           java.lang.String signature,
                                           java.lang.String[] exceptions)
Description copied from interface: wheel.asm.ClassVisitor
Visits a method of the class. This method must return a new MethodVisitor instance (or null) each time it is called, i.e., it should not return a previously returned visitor.

Specified by:
visitMethod in interface wheel.asm.ClassVisitor
Overrides:
visitMethod in class wheel.asm.ClassAdapter
Parameters:
access - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.
name - the method's name.
desc - the method's descriptor (see Type).
signature - the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.
exceptions - the internal names of the method's exception classes (see getInternalName). May be null.
Returns:
an object to visit the byte code of the method, or null if this class visitor is not interested in visiting the code of this method.

getPersistentFields

public java.util.List<WheelAnnotatedField> getPersistentFields()

visitEnd

public void visitEnd()
Description copied from interface: wheel.asm.ClassVisitor
Visits the end of the class. This method, which is the last one to be called, is used to inform the visitor that all the fields and methods of the class have been visited.

Specified by:
visitEnd in interface wheel.asm.ClassVisitor
Overrides:
visitEnd in class wheel.asm.ClassAdapter


Copyright © 2007-2008. All Rights Reserved.