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}.
The frames of a method must be given either in expanded form, or in compressed form (all frames must use the same format, i.e. you must not mix expanded and compressed frames within a single method):
- In expanded form, all frames must have the F_NEW type.
- In compressed form, frames are basically "deltas" from the state of the previous frame:
- {@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 samelocals 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 are thesame 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 frame data.
In both cases the first frame, corresponding to the method's parameters and access flags, is implicit and must not be visited. Also, it is illegal to visit two or more frames for the same code location (i.e., at least one instruction must be visited between two calls to visitFrame).
@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} forcompressed frames.
@param nLocal the number of local variables in the visited frame.
@param local the local variable types in this frame. This array must not be 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 not be modified. Its content has the same format as the "local" array.
@throws IllegalStateException if a frame is visited just after another one, without any instruction between the two (unless this frame is a Opcodes#F_SAME frame, in which case it is silently ignored).