W3cubDocs

/OpenJDK 25

Interface StackMapFrameInfo

public sealed interface StackMapFrameInfo
Models a stack map frame in a 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.DeadCodeOption allows substituting such code, or advanced users can provide their own stack maps for dead code.
See Java Virtual Machine Specification:
4.7.4 The StackMapTable Attribute
4.10.1 Verification by Type Checking
Since:
24
See Also:

Nested Class Summary

Modifier and Type Interface Description
static interface  StackMapFrameInfo.ObjectVerificationTypeInfo
A stack value for an object type.
static enum  StackMapFrameInfo.SimpleVerificationTypeInfo
A simple stack value.
static interface  StackMapFrameInfo.UninitializedVerificationTypeInfo
An uninitialized stack value.
static interface  StackMapFrameInfo.VerificationTypeInfo
The type of a stack or local variable value.

Method Summary

Modifier and Type Method Description
int frameType()
Returns the raw u1 frame_type.
List<StackMapFrameInfo.VerificationTypeInfo> locals()
Returns the expanded local variable types.
static StackMapFrameInfo of(Label target, List<StackMapFrameInfo.VerificationTypeInfo> locals, List<StackMapFrameInfo.VerificationTypeInfo> stack)
Returns a new stack map frame.
List<StackMapFrameInfo.VerificationTypeInfo> stack()
Returns the expanded operand stack types.
Label target()
Returns the frame target label.

Method Details

frameType

int frameType()
Returns the raw u1 frame_type.
Returns:
the raw u1 frame_type

target

Label target()
Returns the frame target label.
Returns:
the frame target label

locals

List<StackMapFrameInfo.VerificationTypeInfo> locals()
Returns the expanded local variable types.
Returns:
the expanded local variable types

stack

List<StackMapFrameInfo.VerificationTypeInfo> stack()
Returns the expanded operand stack types.
Returns:
the expanded operand stack types

of

static StackMapFrameInfo of(Label target, List<StackMapFrameInfo.VerificationTypeInfo> locals, List<StackMapFrameInfo.VerificationTypeInfo> stack)
Returns a new stack map frame.
Parameters:
target - the location of the frame
locals - the complete list of frame locals
stack - the complete frame stack
Returns:
a new stack map frame

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/attribute/StackMapFrameInfo.html