Interface LineNumberTableAttribute
- All Superinterfaces:
Attribute<LineNumberTableAttribute>
,ClassFileElement
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 Summary
Modifier and TypeMethodDescriptionReturns the table mapping bytecode offsets to source line numbers.static LineNumberTableAttribute
of
(List<LineNumberInfo> lines) Returns aLineNumberTable
attribute.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
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 aLineNumberTable
attribute.- Parameters:
lines
- the line number descriptions- Returns:
- a
LineNumberTable
attribute
-