APIdia Launch Partner
Top Description Inners Methods
java.lang

pack-priv Interface LiveStackFrame

extends StackFrame
Known Direct Implementers
java.lang.LiveStackFrameInfo
Imports
java.lang.StackWalker.StackFrame, java.util.EnumSet, .Set, jdk.internal.vm.Continuation, .ContinuationScope

UNSUPPORTED This interface is intended to be package-private or move to an internal package.

LiveStackFrame represents a frame storing data and partial results. Each frame has its own array of local variables (JVMS section 2.6.1), its own operand stack (JVMS section 2.6.2) for a method invocation.

Java Virtual Machine Specification
2.6 Frames

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
LiveStackFrame.PrimitiveSlot

UNSUPPORTED This interface is intended to be package-private or moved to an internal package.

Method Summary

Modifier and TypeMethod and Description
public Object[]

Returns:

the local variable array of this stack frame.
getLocals
()

Gets the local variable array of this stack frame.

public Object[]

Returns:

the monitors held by this stack frames
getMonitors
()

Return the monitors held by this stack frame.

public Object[]

Returns:

the operand stack of this stack frame.
getStack
()

Gets the operand stack of this stack frame.

public static StackWalker
getStackWalker()

Gets StackWalker that can get locals and operands.

public static StackWalker
getStackWalker(Set<StackWalker.Option>
stack walk options
options
)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames.

public static StackWalker
getStackWalker(Set<StackWalker.Option>
stack walk options
options
,
ContinuationScope
the continuation scope up to which (inclusive) to walk the stack
contScope
)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames.

public static StackWalker
getStackWalker(Continuation
the continuation to walk
continuation
)

Gets StackWalker of the given unmounted continuation, that can get locals and operands.

public static StackWalker
getStackWalker(Set<StackWalker.Option>
stack walk options
options
,
ContinuationScope contScope, Continuation
the continuation to walk
continuation
)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames.

Inherited from java.lang.StackWalker.StackFrame:
getByteCodeIndexgetClassNamegetDeclaringClassgetDescriptorgetFileNamegetLineNumbergetMethodNamegetMethodTypeisNativeMethodtoStackTraceElement

Method Detail

getLocalsback to summary
public Object[] getLocals()

Gets the local variable array of this stack frame.

A single local variable can hold a value of type boolean, byte, char, short, int, float, reference or returnAddress. A pair of local variables can hold a value of type long or double (JVMS section 2.6.1). Primitive locals are represented in the returned array as PrimitiveSlots, with longs and doubles occupying a pair of consecutive PrimitiveSlots.

The current VM implementation does not provide specific type information for primitive locals. This method simply returns the raw contents of the VM's primitive locals on a best-effort basis, without indicating a specific type.

The returned array may contain null entries for local variables that are not live.

Implementation Note

The specific subclass of PrimitiveSlot will reflect the underlying architecture, and will be either PrimitiveSlot32 or PrimitiveSlot64.

How a long or double value is stored in the pair of PrimitiveSlots can vary based on the underlying architecture and VM implementation. On 32-bit architectures, long/double values are split between the two PrimitiveSlot32s. On 64-bit architectures, the entire value may be stored in one of the PrimitiveSlot64s, with the other PrimitiveSlot64 being unused.

The contents of the unused, high-order portion of a PrimitiveSlot64 (when storing a primitive other than a long or double) is unspecified. In particular, the unused bits are not necessarily zeroed out.

Returns:Object[]

the local variable array of this stack frame.

getMonitorsback to summary
public Object[] getMonitors()

Return the monitors held by this stack frame. This method returns an empty array if no monitor is held by this stack frame.

Returns:Object[]

the monitors held by this stack frames

getStackback to summary
public Object[] getStack()

Gets the operand stack of this stack frame.

The 0-th element of the returned array represents the top of the operand stack. This method returns an empty array if the operand stack is empty.

Each entry on the operand stack can hold a value of any Java Virtual Machine Type. For a value of primitive type, the element in the returned array is a PrimitiveSlot object; otherwise, the element is the Object on the operand stack.

Returns:Object[]

the operand stack of this stack frame.

getStackWalkerback to summary
public static StackWalker getStackWalker()

Gets StackWalker that can get locals and operands.

getStackWalkerback to summary
public static StackWalker getStackWalker(Set<StackWalker.Option> options)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames. If no option is specified, this StackWalker obtains the method name and the class name with all hidden frames skipped. The returned StackWalker can get locals and operands.

Parameters
options:Set<StackWalker.Option>

stack walk options

getStackWalkerback to summary
public static StackWalker getStackWalker(Set<StackWalker.Option> options, ContinuationScope contScope)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames. If no option is specified, this StackWalker obtains the method name and the class name with all hidden frames skipped. The returned StackWalker can get locals and operands.

Parameters
options:Set<StackWalker.Option>

stack walk options

contScope:ContinuationScope

the continuation scope up to which (inclusive) to walk the stack

getStackWalkerback to summary
public static StackWalker getStackWalker(Continuation continuation)

Gets StackWalker of the given unmounted continuation, that can get locals and operands.

Parameters
continuation:Continuation

the continuation to walk

getStackWalkerback to summary
public static StackWalker getStackWalker(Set<StackWalker.Option> options, ContinuationScope contScope, Continuation continuation)

Gets a StackWalker instance with the given options specifying the stack frame information it can access, and which will traverse at most the given maxDepth number of stack frames. If no option is specified, this StackWalker obtains the method name and the class name with all hidden frames skipped. The returned StackWalker can get locals and operands.

Parameters
options:Set<StackWalker.Option>

stack walk options

continuation:Continuation

the continuation to walk

java.lang back to summary

public abstract Class LiveStackFrame.PrimitiveSlot

extends Object
Class Inheritance
Known Direct Subclasses
java.lang.LiveStackFrameInfo.PrimitiveSlot32, java.lang.LiveStackFrameInfo.PrimitiveSlot64

UNSUPPORTED This interface is intended to be package-private or moved to an internal package.

Represents a local variable or an entry on the operand stack whose value is of primitive type.

Constructor Summary

AccessConstructor and Description
pack-priv
PrimitiveSlot()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the int value if this primitive value is of size 4
intValue
()

Returns the int value if this primitive value is of size 4

public long

Returns:

the long value if this primitive value is of size 8
longValue
()

Returns the long value if this primitive value is of size 8

public abstract int
size()

Returns the size, in bytes, of the slot.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PrimitiveSlotback to summary
pack-priv PrimitiveSlot()

Constructor.

Method Detail

intValueback to summary
public int intValue()

Returns the int value if this primitive value is of size 4

Returns:int

the int value if this primitive value is of size 4

Exceptions
UnsupportedOperationException:
if this primitive value is not of size 4.
longValueback to summary
public long longValue()

Returns the long value if this primitive value is of size 8

Returns:long

the long value if this primitive value is of size 8

Exceptions
UnsupportedOperationException:
if this primitive value is not of size 8.
sizeback to summary
public abstract int size()

Returns the size, in bytes, of the slot.