Class StackMapData

java.lang.Object
org.openjdk.asmtools.jasm.StackMapData
All Implemented Interfaces:
DataWriter

public class StackMapData extends Object implements DataWriter
4.7.4. The StackMapTable Attribute

StackMapTable_attribute { u2 attribute_name_index; u4 attribute_length; u2 number_of_entries; stack_map_frame entries[number_of_entries]; }

  • Field Details

    • hasStackMapTable

      boolean hasStackMapTable
    • localsMap

      DataVector<? extends Indexer> localsMap
    • stackMap

      DataVector<? extends Indexer> stackMap
    • environment

      JasmEnvironment environment
    • pc

      private int pc
    • scannerPosition

      private int scannerPosition
    • offset

      private int offset
    • frameTypeTag

      private int frameTypeTag
    • stackFrameType

      private String stackFrameType
  • Constructor Details

  • Method Details

    • setOffset

      StackMapData setOffset(StackMapData prevFrame)
    • setStackFrameType

      StackMapData setStackFrameType(String stackFrameType)
    • setIsStackMapTable

      StackMapData setIsStackMapTable(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
    • setPC

      StackMapData setPC(int pc)
    • setScannerPosition

      StackMapData setScannerPosition(int scannerPosition)
    • isSet

      boolean isSet()
      Checks whether a method's Code attribute has a StackMapTable attribute.
      Returns:
      true if a method's Code attribute has a StackMapTable attribute.
    • getLength

      public int getLength()
      Specified by:
      getLength in interface DataWriter
    • write

      public void write(CheckedDataOutputStream out) throws IOException
      Specified by:
      write in interface DataWriter
      Throws:
      IOException