Top Description Fields Constructors Methods
org.objectweb.asm.tree

public Class FrameNode

extends AbstractInsnNode
Class Inheritance
Imports
java.util.ArrayList, .List, .Map, org.objectweb.asm.MethodVisitor, .Opcodes

A node that represents a stack map frame. These nodes are pseudo instruction nodes in order to be inserted in an instruction list. In fact these nodes must(*) be inserted just before any instruction node i that follows an unconditionnal branch instruction such as GOTO or THROW, that is the target of a jump instruction, or that starts an exception handler block. The stack map frame 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 Opcodes#V1_6.
Author
Eric Bruneton

Field Summary

Modifier and TypeField and Description
public List<Object>
local

The types of the local variables of this stack map frame.

public List<Object>
stack

The types of the operand stack elements of this stack map frame.

public int
type

The type of this frame.

Inherited from org.objectweb.asm.tree.AbstractInsnNode:
FIELD_INSNFRAMEIINC_INSNindexINSNINT_INSNinvisibleTypeAnnotationsINVOKE_DYNAMIC_INSNJUMP_INSNLABELLDC_INSNLINELOOKUPSWITCH_INSNMETHOD_INSNMULTIANEWARRAY_INSNnextInsnopcodepreviousInsnTABLESWITCH_INSNTYPE_INSNVAR_INSNvisibleTypeAnnotations

Constructor Summary

AccessConstructor and Description
private
public
FrameNode(final int
the type of this frame. Must be Opcodes#F_NEW for expanded frames, or Opcodes#F_FULL, Opcodes#F_APPEND, Opcodes#F_CHOP, Opcodes#F_SAME or Opcodes#F_APPEND, Opcodes#F_SAME1 for compressed frames.
type
,
final int
number of local variables of this stack map frame. Long and double values count for one variable.
numLocal
,
final Object[]
the types of the local variables of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor). Long and double values are represented by a single element.
local
,
final int
number of operand stack elements of this stack map frame. Long and double values count for one stack element.
numStack
,
final Object[]
the types of the operand stack elements of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor). Long and double values are represented by a single element.
stack
)

Constructs a new FrameNode.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final MethodVisitor
a method visitor.
methodVisitor
)

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.accept.

Makes the given method visitor visit this instruction.
private static Object[]
asArray(final List<Object> list)

public AbstractInsnNode
clone(final Map<LabelNode, LabelNode>
a map from LabelNodes to cloned LabelNodes.
clonedLabels
)

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.clone.

Returns a copy of this instruction.
public int
getType()

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.getType.

Returns the type of this instruction.
Inherited from org.objectweb.asm.tree.AbstractInsnNode:
acceptAnnotationscloneclonecloneAnnotationsgetNextgetOpcodegetPrevious

Field Detail

localback to summary
public List<Object> local

The types of the local variables of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor).

stackback to summary
public List<Object> stack

The types of the operand stack elements of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor).

typeback to summary
public int type

The type of this frame. Must be Opcodes#F_NEW for expanded frames, or Opcodes#F_FULL, Opcodes#F_APPEND, Opcodes#F_CHOP, Opcodes#F_SAME or Opcodes#F_APPEND, Opcodes#F_SAME1 for compressed frames.

Constructor Detail

FrameNodeback to summary
private FrameNode()
FrameNodeback to summary
public FrameNode(final int type, final int numLocal, final Object[] local, final int numStack, final Object[] stack)

Constructs a new FrameNode.

Parameters
type:int

the type of this frame. Must be Opcodes#F_NEW for expanded frames, or Opcodes#F_FULL, Opcodes#F_APPEND, Opcodes#F_CHOP, Opcodes#F_SAME or Opcodes#F_APPEND, Opcodes#F_SAME1 for compressed frames.

numLocal:int

number of local variables of this stack map frame. Long and double values count for one variable.

local:Object[]

the types of the local variables of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor). Long and double values are represented by a single element.

numStack:int

number of operand stack elements of this stack map frame. Long and double values count for one stack element.

stack:Object[]

the types of the operand stack elements of this stack map frame. Elements of this list can be Integer, String or LabelNode objects (for primitive, reference and uninitialized types respectively - see MethodVisitor). Long and double values are represented by a single element.

Method Detail

acceptback to summary
public void accept(final MethodVisitor methodVisitor)

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.accept.

Doc from org.objectweb.asm.tree.AbstractInsnNode.accept.

Makes the given method visitor visit this instruction.

Parameters
methodVisitor:MethodVisitor

a method visitor.

Annotations
@Override
asArrayback to summary
private static Object[] asArray(final List<Object> list)
cloneback to summary
public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels)

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.clone.

Doc from org.objectweb.asm.tree.AbstractInsnNode.clone.

Returns a copy of this instruction.

Parameters
clonedLabels:Map<LabelNode, LabelNode>

a map from LabelNodes to cloned LabelNodes.

Returns:AbstractInsnNode

a copy of this instruction. The returned instruction does not belong to any InsnList.

Annotations
@Override
getTypeback to summary
public int getType()

Implements abstract org.objectweb.asm.tree.AbstractInsnNode.getType.

Doc from org.objectweb.asm.tree.AbstractInsnNode.getType.

Returns the type of this instruction.

Returns:int

the type of this instruction, i.e. one the constants defined in this class.

Annotations
@Override