Class LineNumberData

java.lang.Object
org.openjdk.asmtools.jdis.Indenter
org.openjdk.asmtools.jdis.LineNumberData
All Implemented Interfaces:
Printable

public class LineNumberData extends Indenter
Represents a single line number data entry within a Line Number Table attribute. This class extends the Indenter class to provide indentation functionality.
  • Field Details

    • start_pc

      protected short start_pc
      The starting program counter of this line number entry.
    • line_number

      protected short line_number
      The line number corresponding to the start_pc.
    • format

      protected String format
      A format string used for printing the line number data.
  • Constructor Details

    • LineNumberData

      public LineNumberData(DataInputStream in, MethodData methodData) throws IOException
      Constructs a new LineNumberData instance from the given DataInputStream and MethodData.
      Parameters:
      in - the DataInputStream containing the line number data
      methodData - the MethodData instance associated with this LineNumberData
      Throws:
      IOException - if an I/O error occurs during construction
  • Method Details

    • isPrintable

      public boolean isPrintable()
      Checks if this LineNumberData instance should be printed.
      Returns:
      true if either printLineTable or tableFormat is enabled, false otherwise.
    • jasmPrint

      protected void jasmPrint(int index, int size) throws IOException
      Prints this LineNumberData instance in JASM format.
      Overrides:
      jasmPrint in class Indenter
      Parameters:
      index - the index of this entry in the Line Number Table
      size - the total number of entries in the Line Number Table
      Throws:
      IOException - if an I/O error occurs during printing
    • getTitle

      protected String getTitle()
      Overrides:
      getTitle in class Indenter
    • tablePrint

      protected void tablePrint(int index, int size) throws IOException
      Prints this LineNumberData instance in Table(javap) format.
      Overrides:
      tablePrint in class Indenter
      Parameters:
      index - the index of this entry in the Line Number Table
      size - the total number of entries in the Line Number Table
      Throws:
      IOException - if an I/O error occurs during printing