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 LineNumberPREVIEW when traversing the
elements of a CodeModelPREVIEW, according to the setting of the
ClassFile.LineNumbersOptionPREVIEW 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 aLineNumberTableattribute.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 aLineNumberTableattribute.- Parameters:
lines- the line number descriptions- Returns:
- a
LineNumberTableattribute
-
LineNumberTableAttributewhen preview features are enabled.