Visits the current state of the local variables and operand stack elements. This method must(*) be called
just before any instruction
i that follows an unconditional branch instruction such as GOTO or THROW, that is the target of a jump instruction, or that starts an exception handler block. The visited types must describe the values of the local variables and of the operand stack elements
just before i is executed.
(*) this is mandatory only for classes whose version is greater than or equal to {@link Opcodes#V1_6 V1_6}.
Packed frames are basically "deltas" from the state of the previous frame (very first frame is implicitly defined by the method's parameters and access flags):
- {@link Opcodes#F_SAME} representing frame with exactly the samelocals as the previous frame and with the empty stack.
- {@link Opcodes#F_SAME1}representing frame with exactly the same locals as the previous frame and with single value on the stack (
nStack
is 1 and stack[0]
contains value for the type of the stack item). - {@link Opcodes#F_APPEND} representing frame with current locals arethe same as the locals in the previous frame, except that additional locals are defined (
nLocal
is 1, 2 or 3 and local
elements contains values representing added types). - {@link Opcodes#F_CHOP} representing frame with current locals arethe same as the locals in the previous frame, except that the last 1-3 locals are absent and with the empty stack (
nLocals
is 1, 2 or 3). - {@link Opcodes#F_FULL} representing complete framedata.
@param type the type of this stack map frame. Must be{@link Opcodes#F_NEW} for expanded frames, or{@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link Opcodes#F_SAME} or{@link Opcodes#F_APPEND}, {@link Opcodes#F_SAME1} for compressedframes.
@param nLocal the number of local variables in the visited frame.
@param local the local variable types in this frame. This array must notbe modified. Primitive types are represented by {@link Opcodes#TOP}, {@link Opcodes#INTEGER}, {@link Opcodes#FLOAT}, {@link Opcodes#LONG}, {@link Opcodes#DOUBLE}, {@link Opcodes#NULL} or{@link Opcodes#UNINITIALIZED_THIS} (long and double arerepresented by a single element). 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).
@param nStack the number of operand stack elements in the visited frame.
@param stack the operand stack types in this frame. This array must notbe modified. Its content has the same format as the "local" array.
@throws IllegalStateException if a frame is visited just after anotherone, without any instruction between the two (unless this frame is a Opcodes#F_SAME frame, in which case it is silently ignored).