public class LineNumberAttribute extends AttributeInfo
LineNumberTable_attribute
.Modifier and Type | Class | Description |
---|---|---|
static class |
LineNumberAttribute.Pc |
Used as a return type of
toNearPc() . |
Modifier and Type | Field | Description |
---|---|---|
static String |
tag |
The name of this attribute
"LineNumberTable" . |
constPool
Modifier and Type | Method | Description |
---|---|---|
AttributeInfo |
copy(ConstPool newCp,
Map<String,String> 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.
|
get, getConstPool, getName, length, set
public static final String tag
"LineNumberTable"
.public int tableLength()
line_number_table_length
.
This represents the number of entries in the table.public int startPc(int i)
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.i
- the i-th entry.public int lineNumber(int i)
line_number_table[i].line_number
.
This represents the corresponding line number in the original
source file.i
- the i-th entry.public int toLineNumber(int pc)
pc
- the index into the code array.public int toStartPc(int line)
line
- the line number.public LineNumberAttribute.Pc toNearPc(int line)
line
- the line number.public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames)
copy
in class AttributeInfo
newCp
- the constant pool table used by the new copy.classnames
- should be null.Copyright © 2018 Shigeru Chiba, www.javassist.org. All rights reserved.