javassist.bytecode
public class LineNumberAttribute extends AttributeInfo
LineNumberTable_attribute
.
Nested Class Summary | |
---|---|
static class | LineNumberAttribute.Pc
Used as a return type of toNearPc() . |
Field Summary | |
---|---|
static String | tag
The name of this attribute "LineNumberTable" . |
Method Summary | |
---|---|
AttributeInfo | copy(ConstPool newCp, Map classnames)
Makes a copy.
|
int | lineNumber(int i)
Returns line_number_table[i].line_number .
|
int | startPc(int i)
Returns line_number_table[i].start_pc .
|
int | tableLength()
Returns line_number_table_length .
|
int | toLineNumber(int pc)
Returns the line number corresponding to the specified bytecode.
|
LineNumberAttribute.Pc | toNearPc(int line)
Returns the index into the code array at which the code for
the specified line (or the nearest line after the specified one)
begins.
|
int | toStartPc(int line)
Returns the index into the code array at which the code for
the specified line begins.
|
"LineNumberTable"
.Parameters: newCp the constant pool table used by the new copy. classnames should be null.
line_number_table[i].line_number
.
This represents the corresponding line number in the original
source file.
Parameters: i the i-th entry.
line_number_table[i].start_pc
.
This represents the index into the code array at which the code
for a new line in the original source file begins.
Parameters: i the i-th entry.
line_number_table_length
.
This represents the number of entries in the table.Parameters: pc the index into the code array.
Parameters: line the line number.
Returns: a pair of the index and the line number of the bytecode at that index.
Parameters: line the line number.
Returns: -1 if the specified line is not found.