StackMapTable
attribute (JVMS 4.7.4). A stack map frame must appear at the
beginning of each basic block in a method (JVMS 4.10.1).
API Note
In general, a stack map frame should be defined for each target of a
BranchInstruction, or unreachable code right after an unconditional
branch instruction like goto. The automatic stack map
generation cannot handle unreachable code right after an unconditional jump;
The ClassFile. allows substituting such code, or
advanced users can provide their own stack maps for dead code.
StackMapTable Attribute, 4.10.1 Verification by Type Checking
StackMapTableAttribute#entries()
| Modifier and Type | Class and Description |
|---|---|
| public static interface | StackMapFrameInfo.
A stack value for an object type. |
| public static enum | StackMapFrameInfo.
A simple stack value. |
| public static interface | StackMapFrameInfo.
An uninitialized stack value. |
| public static interface | StackMapFrameInfo.
The type of a stack or local variable value. |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public List | |
| public static StackMapFrameInfo | Returns: a new stack map framethe location of the frame target, List<StackMapFrameInfo.the complete list of frame locals locals,the complete frame stack stackReturns a new stack map frame. |
| public List | |
| public Label |
| frameType | back to summary |
|---|---|
| public int frameType() Returns the raw
| |
| locals | back to summary |
|---|---|
| public List Returns the expanded local variable types.
| |
| of | back to summary |
|---|---|
| public static StackMapFrameInfo of(Label target, List<StackMapFrameInfo. Returns a new stack map frame.
| |
| stack | back to summary |
|---|---|
| public List Returns the expanded operand stack types.
| |
| target | back to summary |
|---|---|
| public Label target() Returns the frame target label.
| |
tag is 7.
StackMapTable Attribute
| Modifier and Type | Method and Description |
|---|---|
| public ClassEntry | |
| public default ClassDesc | Returns: the class of the object, as a symbolic descriptorReturns the class of the object, as a symbolic descriptor. |
| public static StackMapFrameInfo. | Returns: a new object verification type infothe class of the object className)Returns a new object verification type info. |
| public static StackMapFrameInfo. |
| className | back to summary |
|---|---|
| public ClassEntry className() Returns the class of the object.
| |
| classSymbol | back to summary |
|---|---|
| public default ClassDesc classSymbol() Returns the class of the object, as a symbolic descriptor.
| |
| of | back to summary |
|---|---|
| public static StackMapFrameInfo. Returns a new object verification type info.
| |
| of | back to summary |
|---|---|
| public static StackMapFrameInfo. Returns a new object verification type info.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final StackMapFrameInfo. | DOUBLE
Verification type double. |
| public static final StackMapFrameInfo. | FLOAT
Verification type float. |
| public static final StackMapFrameInfo. | INTEGER
Verification type int. |
| public static final StackMapFrameInfo. | LONG
Verification type long. |
| public static final StackMapFrameInfo. | NULL
Verification type null. |
| private final int | |
| public static final StackMapFrameInfo. | TOP
Verification type top. |
| public static final StackMapFrameInfo. | UNINITIALIZED_THIS
Verification type uninitializedThis. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | tag()
Implements java. Returns the tag of the type info. |
| public static StackMapFrameInfo. | |
| public static StackMapFrameInfo. |
| DOUBLE | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type double. | |
| FLOAT | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type float. | |
| INTEGER | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type int. | |
| LONG | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type long. | |
| NULL | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type null. | |
| tag | back to summary |
|---|---|
| private final int tag | |
| TOP | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type top. | |
| UNINITIALIZED_THIS | back to summary |
|---|---|
| public static final StackMapFrameInfo. Verification type uninitializedThis. | |
| SimpleVerificationTypeInfo | back to summary |
|---|---|
| private SimpleVerificationTypeInfo(int tag) | |
| tag | back to summary |
|---|---|
| public int tag() Implements java. Doc from java. Returns the tag of the type info.
| |
| valueOf | back to summary |
|---|---|
| public static StackMapFrameInfo. | |
| values | back to summary |
|---|---|
| public static StackMapFrameInfo. | |
tag is 8.
StackMapTable Attribute
| Modifier and Type | Method and Description |
|---|---|
| public Label | |
| public static StackMapFrameInfo. |
| newTarget | back to summary |
|---|---|
| public Label newTarget() Returns the label immediately before the | |
| of | back to summary |
|---|---|
| public static StackMapFrameInfo. Returns an uninitialized verification type info.
| |
StackMapTable Attribute
locals(), stack()
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | ITEM_UNINITIALIZED
The |
| public static final int | ITEM_UNINITIALIZED_THIS
The |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| ITEM_DOUBLE | back to summary |
|---|---|
| public static final int ITEM_DOUBLE | |
| ITEM_FLOAT | back to summary |
|---|---|
| public static final int ITEM_FLOAT | |
| ITEM_INTEGER | back to summary |
|---|---|
| public static final int ITEM_INTEGER | |
| ITEM_LONG | back to summary |
|---|---|
| public static final int ITEM_LONG | |
| ITEM_NULL | back to summary |
|---|---|
| public static final int ITEM_NULL | |
| ITEM_OBJECT | back to summary |
|---|---|
| public static final int ITEM_OBJECT | |
| ITEM_TOP | back to summary |
|---|---|
| public static final int ITEM_TOP | |
| ITEM_UNINITIALIZED | back to summary |
|---|---|
| public static final int ITEM_UNINITIALIZED The | |
| ITEM_UNINITIALIZED_THIS | back to summary |
|---|---|
| public static final int ITEM_UNINITIALIZED_THIS The | |
| tag | back to summary |
|---|---|
| public int tag() Returns the tag of the type info. API Note
| |