Package gnu.bytecode

Class LineNumbersAttr


  • public class LineNumbersAttr
    extends Attribute
    Represents the contents of a standard "LineNumberTable" attribute.
    • Constructor Detail

      • LineNumbersAttr

        public LineNumbersAttr​(CodeAttr code)
        Add a new LineNumbersAttr to a CodeAttr.
      • LineNumbersAttr

        public LineNumbersAttr​(short[] numbers,
                               CodeAttr code)
    • Method Detail

      • put

        public void put​(int linenumber,
                        int PC)
        Add a new line number entry.
        Parameters:
        linenumber - the number in the source file for this entry
        PC - the byte code location for the code for this line number.
      • getLength

        public final int getLength()
        Get the number of line number entries.
        Specified by:
        getLength in class Attribute
      • getLineCount

        public int getLineCount()
      • getLineNumberTable

        public short[] getLineNumberTable()