org.objectweb.asm.commons
Class AnalyzerAdapter
- MethodVisitor
public class AnalyzerAdapter
A
MethodAdapter
that keeps track of stack map frame changes between
visitFrame
calls. This
adapter must be used with the
ClassReader.EXPAND_FRAMES
option. Each visit
XXX
instruction delegates to the next visitor in the chain, if any, and then
simulates the effect of this instruction on the stack map frame, represented
by
locals
and
stack
. The next visitor in the chain can get
the state of the stack map frame
before each instruction by reading
the value of these fields in its visit
XXX methods (this requires a
reference to the AnalyzerAdapter that is before it in the chain).
List | locals -
List of the local variable slots for current execution
frame.
|
List | stack -
List of the operand stack slots for current execution
frame.
|
void | visitFieldInsn(int opcode, String owner, String name, String desc)
|
void | visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack)
|
void | visitIincInsn(int var, int increment)
|
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 | visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
|
void | visitMaxs(int maxStack, int maxLocals)
|
void | visitMethodInsn(int opcode, String owner, String name, String desc)
|
void | visitMultiANewArrayInsn(String desc, int dims)
|
void | visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels)
|
void | visitTypeInsn(int opcode, String type)
|
void | visitVarInsn(int opcode, int var)
|
visitAnnotation , visitAnnotationDefault , visitAttribute , visitCode , visitEnd , visitFieldInsn , visitFrame , visitIincInsn , visitInsn , visitIntInsn , visitJumpInsn , visitLabel , visitLdcInsn , visitLineNumber , visitLocalVariable , visitLookupSwitchInsn , visitMaxs , visitMethodInsn , visitMultiANewArrayInsn , visitParameterAnnotation , visitTableSwitchInsn , visitTryCatchBlock , visitTypeInsn , visitVarInsn |
locals
public List locals
List
of the local variable slots for current execution
frame. Primitive types are represented by
Opcodes.TOP
,
Opcodes.INTEGER
,
Opcodes.FLOAT
,
Opcodes.LONG
,
Opcodes.DOUBLE
,
Opcodes.NULL
or
Opcodes.UNINITIALIZED_THIS
(long and double are represented by a
two elements, the second one being TOP). Reference types are represented
by String objects (representing internal names), and uninitialized types
by Label objects (this label designates the NEW instruction that created
this uninitialized value). This field is
null for unreacheable
instructions.
stack
public List stack
List
of the operand stack slots for current execution
frame. Primitive types are represented by
Opcodes.TOP
,
Opcodes.INTEGER
,
Opcodes.FLOAT
,
Opcodes.LONG
,
Opcodes.DOUBLE
,
Opcodes.NULL
or
Opcodes.UNINITIALIZED_THIS
(long and double are represented by a
two elements, the second one being TOP). Reference types are represented
by String objects (representing internal names), and uninitialized types
by Label objects (this label designates the NEW instruction that created
this uninitialized value). This field is
null for unreacheable
instructions.
AnalyzerAdapter
public AnalyzerAdapter(String owner,
int access,
String name,
String desc,
MethodVisitor mv)
owner
- the owner's class name.access
- the method's access flags (see Opcodes
).name
- the method's name.desc
- the method's descriptor (see Type
).mv
- the method visitor to which this adapter delegates calls. May
be null.