Interface LineNumber

All Superinterfaces:
ClassFileElementPREVIEW, CodeElementPREVIEW, PseudoInstructionPREVIEW

public sealed interface LineNumber extends PseudoInstructionPREVIEW
LineNumber is a preview API of the Java platform.
Programs can only use LineNumber when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A pseudo-instruction which models a single entry in the LineNumberTableAttributePREVIEW. Delivered as a CodeElementPREVIEW during traversal of the elements of a CodeModelPREVIEW, according to the setting of the ClassFile.LineNumbersOptionPREVIEW option.
Since:
22
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the line number.
    of(int line)
    Returns a line number pseudo-instruction.
  • Method Details

    • line

      int line()
      Returns the line number.
      Returns:
      the line number
    • of

      static LineNumberPREVIEW of(int line)
      Returns a line number pseudo-instruction.
      Parameters:
      line - the line number
      Returns:
      a line number pseudo-instruction