CodeVisitorpublic interface CodeVisitor A visitor to visit the bytecode instructions of a Java method. The methods
of this visitor must be called in the sequential order of the bytecode
instructions of the visited code. The {@link #visitMaxs visitMaxs} method
must be called after all the instructions have been visited. The {@link
#visitTryCatchBlock visitTryCatchBlock}, {@link #visitLocalVariable
visitLocalVariable} and {@link #visitLineNumber visitLineNumber} methods may
be called in any order, at any time (provided the labels passed as arguments
have already been visited with {@link #visitLabel visitLabel}). |
Methods Summary |
---|
public void | visitAttribute(oracle.toplink.libraries.asm.Attribute attr)Visits a non standard attribute of the code. This method must visit only
the first attribute in the given attribute list.
| public void | visitFieldInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc)Visits a field instruction. A field instruction is an instruction that
loads or stores the value of a field of an object.
| public void | visitIincInsn(int var, int increment)Visits an IINC instruction.
| public void | visitInsn(int opcode)Visits a zero operand instruction.- param
- opcode the opcode of the instruction to be visited. This opcode is
either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2,
ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1,
FCONST_2, DCONST_0, DCONST_1,
IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD,
IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE,
SASTORE,
POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP,
IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL,
DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG,
FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR,
LOR, IXOR, LXOR,
I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C,
I2S,
LCMP, FCMPL, FCMPG, DCMPL, DCMPG,
IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN,
ARRAYLENGTH,
ATHROW,
MONITORENTER, or MONITOREXIT.
|
| public void | visitIntInsn(int opcode, int operand)Visits an instruction with a single int operand.
| public void | visitJumpInsn(int opcode, oracle.toplink.libraries.asm.Label label)Visits a jump instruction. A jump instruction is an instruction that may
jump to another instruction.
| public void | visitLabel(oracle.toplink.libraries.asm.Label label)Visits a label. A label designates the instruction that will be visited
just after it.
| public void | visitLdcInsn(java.lang.Object cst)Visits a LDC instruction.
| public void | visitLineNumber(int line, oracle.toplink.libraries.asm.Label start)Visits a line number declaration.
| public void | visitLocalVariable(java.lang.String name, java.lang.String desc, oracle.toplink.libraries.asm.Label start, oracle.toplink.libraries.asm.Label end, int index)Visits a local variable declaration.
| public void | visitLookupSwitchInsn(oracle.toplink.libraries.asm.Label dflt, int[] keys, oracle.toplink.libraries.asm.Label[] labels)Visits a LOOKUPSWITCH instruction.
| public void | visitMaxs(int maxStack, int maxLocals)Visits the maximum stack size and the maximum number of local variables of
the method.
| public void | visitMethodInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc)Visits a method instruction. A method instruction is an instruction that
invokes a method.
| public void | visitMultiANewArrayInsn(java.lang.String desc, int dims)Visits a MULTIANEWARRAY instruction.
| public void | visitTableSwitchInsn(int min, int max, oracle.toplink.libraries.asm.Label dflt, oracle.toplink.libraries.asm.Label[] labels)Visits a TABLESWITCH instruction.
| public void | visitTryCatchBlock(oracle.toplink.libraries.asm.Label start, oracle.toplink.libraries.asm.Label end, oracle.toplink.libraries.asm.Label handler, java.lang.String type)Visits a try catch block.
| public void | visitTypeInsn(int opcode, java.lang.String desc)Visits a type instruction. A type instruction is an instruction that
takes a type descriptor as parameter.
| public void | visitVarInsn(int opcode, int var)Visits a local variable instruction. A local variable instruction is an
instruction that loads or stores the value of a local variable.
|
|