public final class LineNumberTable extends Attribute implements Iterable<LineNumber>
Code
,
LineNumber
constant_pool, EMPTY_ARRAY, length, name_index, tag
Constructor and Description |
---|
LineNumberTable(int nameIndex,
int length,
LineNumber[] lineNumberTable,
ConstantPool constantPool) |
LineNumberTable(LineNumberTable c) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool constantPool) |
void |
dump(DataOutputStream file)
Dump line number table attribute to file stream in binary format.
|
LineNumber[] |
getLineNumberTable() |
int |
getSourceLine(int pos)
Map byte code positions to source code lines.
|
int |
getTableLength() |
Iterator<LineNumber> |
iterator() |
void |
setLineNumberTable(LineNumber[] lineNumberTable) |
String |
toString() |
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public LineNumberTable(int nameIndex, int length, LineNumber[] lineNumberTable, ConstantPool constantPool)
public LineNumberTable(LineNumberTable c)
public void accept(Visitor v)
public Attribute copy(ConstantPool constantPool)
public void dump(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file streamIOException
- if an I/O Exception occurs in writeShortpublic LineNumber[] getLineNumberTable()
public int getSourceLine(int pos)
pos
- byte code offsetpublic int getTableLength()
public Iterator<LineNumber> iterator()
iterator
in interface Iterable<LineNumber>
public void setLineNumberTable(LineNumber[] lineNumberTable)
lineNumberTable
- the line number entries for this tableCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.