Interface LineNumberTableAttribute
- All Superinterfaces:
AttributePREVIEW<LineNumberTableAttributePREVIEW>
,ClassFileElementPREVIEW
public sealed interface LineNumberTableAttribute
extends AttributePREVIEW<LineNumberTableAttributePREVIEW>
LineNumberTableAttribute
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
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
PREVIEW when traversing the
elements of a CodeModel
PREVIEW, according to the setting of the
ClassFile.LineNumbersOption
PREVIEW option.
The attribute permits multiple instances in a given location.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the table mapping bytecode offsets to source line numbers.of
(List<LineNumberInfoPREVIEW> lines) Returns aLineNumberTable
attribute.Methods declared in interface java.lang.classfile.AttributePREVIEW
attributeMapper, attributeName
-
Method Details
-
lineNumbers
List<LineNumberInfoPREVIEW> lineNumbers()Returns the table mapping bytecode offsets to source line numbers.- Returns:
- the table mapping bytecode offsets to source line numbers
-
of
Returns aLineNumberTable
attribute.- Parameters:
lines
- the line number descriptions- Returns:
- a
LineNumberTable
attribute
-
LineNumberTableAttribute
when preview features are enabled.