public final class LineNumberTable extends Attribute
Code
,
LineNumber
,
Serialized FormModifier and Type | Field and Description |
---|---|
private LineNumber[] |
line_number_table |
private int |
line_number_table_length |
constant_pool, length, name_index, tag
Constructor and Description |
---|
LineNumberTable(int name_index,
int length,
java.io.DataInputStream file,
ConstantPool constant_pool)
Construct object from file stream.
|
LineNumberTable(int name_index,
int length,
LineNumber[] line_number_table,
ConstantPool constant_pool) |
LineNumberTable(LineNumberTable c) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool _constant_pool) |
void |
dump(java.io.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() |
void |
setLineNumberTable(LineNumber[] line_number_table) |
java.lang.String |
toString() |
addAttributeReader, clone, getConstantPool, getLength, getNameIndex, getTag, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
private int line_number_table_length
private LineNumber[] line_number_table
public LineNumberTable(LineNumberTable c)
public LineNumberTable(int name_index, int length, LineNumber[] line_number_table, ConstantPool constant_pool)
LineNumberTable(int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool) throws java.io.IOException
name_index
- Index of namelength
- Content length in bytesfile
- Input streamconstant_pool
- Array of constantsjava.io.IOException
public void accept(Visitor v)
public final void dump(java.io.DataOutputStream file) throws java.io.IOException
public final LineNumber[] getLineNumberTable()
public final void setLineNumberTable(LineNumber[] line_number_table)
line_number_table
- the line number entries for this tablepublic final java.lang.String toString()
public int getSourceLine(int pos)
pos
- byte code offsetpublic Attribute copy(ConstantPool _constant_pool)
public final int getTableLength()