Class StackMapData
java.lang.Object
org.openjdk.asmtools.jasm.StackMapData
- All Implemented Interfaces:
DataWriter
4.7.4. The StackMapTable Attribute
StackMapTable_attribute { u2 attribute_name_index; u4 attribute_length; u2 number_of_entries; stack_map_entry entries[number_of_entries]; }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classverification_type_info: Top_variable_info, Integer_variable_info, Float_variable_info, Null_variable_info, UninitializedThis_variable_info, Long_variable_info, Double_variable_info Common format: *_info { u1 tag = ITEM_*; // from 0 to 6 }static classverification_type_info: Object_variable_info, Uninitialized_variable_info Common Format: *_info { u1 tag = ITEM_*; // from 7 to 8 u2 cpool_index/offset; } -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StackMap.EntryType(package private) final JasmEnvironment(package private) final boolean(package private) DataVector<? extends Indexer> private intprivate intprivate long(package private) DataVector<? extends Indexer> (package private) static final int(package private) DataVector<? extends Indexer> -
Constructor Summary
ConstructorsConstructorDescriptionStackMapData(JasmEnvironment environment, boolean hasStackMapTable) In a class file whose version number is 50.0 or above, if a method's Code attribute does not have a StackMapTable attribute, it has an implicit stack map attribute (§4.10.1). -
Method Summary
Modifier and TypeMethodDescription(package private) JasmTokens.TokenChecks whether all fields corresponding to the current frame type are set.intboolean(package private) booleanChecks whether a method's Code attribute has a StackMapTable attribute.private booleanisFull(DataVector<?>... maps) (package private) booleanThe early_larval_frame wraps a base_frame.(package private) StackMapDatasetOffset(int offset) (package private) StackMapDatasetOffset(StackMapData prevFrame) (package private) StackMapDatasetPC(int pc) (package private) StackMapDatasetScannerPosition(long scannerPosition) (package private) StackMapDatasetStackFrameType(int stackFrameTypeValue) Sets Stack Frame type by number in table presentation: frame_type = 252(package private) StackMapDatasetStackFrameTypeByName(String stackFrameTypeName) void
-
Field Details
-
UNDEFINED
static final int UNDEFINED- See Also:
-
environment
-
scannerPosition
private long scannerPosition -
hasStackMapTable
final boolean hasStackMapTable -
pc
private int pc -
offset
private int offset -
entryType
-
localsMap
DataVector<? extends Indexer> localsMap -
stackMap
DataVector<? extends Indexer> stackMap -
unsetFields
DataVector<? extends Indexer> unsetFields
-
-
Constructor Details
-
StackMapData
StackMapData(JasmEnvironment environment, boolean hasStackMapTable) In a class file whose version number is 50.0 or above, if a method's Code attribute does not have a StackMapTable attribute, it has an implicit stack map attribute (§4.10.1). This implicit stack map attribute is equivalent to a StackMapTable attribute with number_of_entries equal to zero.- Parameters:
hasStackMapTable- false if a method's Code attribute does not have a StackMapTable attribute
-
-
Method Details
-
setOffset
-
setOffset
-
setPC
-
setStackFrameTypeByName
-
setStackFrameType
Sets Stack Frame type by number in table presentation: frame_type = 252- Parameters:
stackFrameTypeValue- frame type tag- Returns:
- StackMapData object
-
setScannerPosition
-
isFrameTypeSet
boolean isFrameTypeSet()Checks whether a method's Code attribute has a StackMapTable attribute.- Returns:
- true if a method's Code attribute has a StackMapTable attribute.
-
isWrapper
boolean isWrapper()The early_larval_frame wraps a base_frame. As a wrapper, it doesn't supply the offset_delta.- Returns:
- true if the StackMapData is a base_frame wrapper.
-
isCountable
public boolean isCountable()- Specified by:
isCountablein interfaceDataWriter
-
checkIntegrity
JasmTokens.Token checkIntegrity()Checks whether all fields corresponding to the current frame type are set.- Returns:
- null if all fields are sufficiently valid to be written for the current stack map entry otherwise expected token
-
isFull
-
getLength
public int getLength()- Specified by:
getLengthin interfaceDataWriter
-
write
- Specified by:
writein interfaceDataWriter- Throws:
IOException
-
getFrameType
-