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,
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(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) |
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, DataInputStream file, ConstantPool constant_pool) throws IOException
name_index
- Index of namelength
- Content length in bytesfile
- Input streamconstant_pool
- Array of constantsIOException
public void accept(Visitor v)
public final void dump(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file streamIOException
public final LineNumber[] getLineNumberTable()
public final void setLineNumberTable(LineNumber[] line_number_table)
line_number_table
- the line number entries for this tablepublic final String toString()
public int getSourceLine(int pos)
pos
- byte code offsetpublic Attribute copy(ConstantPool _constant_pool)
public final int getTableLength()