Interface LineNumberTableAttribute

All Superinterfaces:
Attribute<LineNumberTableAttribute>, ClassFileElement

public sealed interface LineNumberTableAttribute extends Attribute<LineNumberTableAttribute>
Models the LineNumberTable attribute (JVMS 4.7.12), which can appear on a Code attribute, and records the mapping between indexes into the code table and line numbers in the source file. Delivered as a LineNumber when traversing the elements of a CodeModel, according to the setting of the ClassFile.LineNumbersOption option.

The attribute permits multiple instances in a given location.

Since:
24
  • Method Details

    • lineNumbers

      List<LineNumberInfo> lineNumbers()
      Returns the table mapping bytecode offsets to source line numbers.
      Returns:
      the table mapping bytecode offsets to source line numbers
    • of

      Returns a LineNumberTable attribute.
      Parameters:
      lines - the line number descriptions
      Returns:
      a LineNumberTable attribute