Package javassist.bytecode
Class LineNumberAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.LineNumberAttribute
LineNumberTable_attribute.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classUsed as a return type oftoNearPc().
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionMakes a copy.intlineNumber(int i) Returnsline_number_table[i].line_number.intstartPc(int i) Returnsline_number_table[i].start_pc.intReturnsline_number_table_length.inttoLineNumber(int pc) Returns the line number corresponding to the specified bytecode.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.inttoStartPc(int line) Returns the index into the code array at which the code for the specified line begins.Methods inherited from class javassist.bytecode.AttributeInfoget, getConstPool, getName, length, set
- 
Field Details- 
tagThe name of this attribute"LineNumberTable".- See Also:
 
 
- 
- 
Method Details- 
tableLengthpublic int tableLength()Returnsline_number_table_length. This represents the number of entries in the table.
- 
startPcpublic int startPc(int i) Returnsline_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.
 
- 
lineNumberpublic int lineNumber(int i) Returnsline_number_table[i].line_number. This represents the corresponding line number in the original source file.- Parameters:
- i- the i-th entry.
 
- 
toLineNumberpublic int toLineNumber(int pc) Returns the line number corresponding to the specified bytecode.- Parameters:
- pc- the index into the code array.
 
- 
toStartPcpublic int toStartPc(int line) Returns the index into the code array at which the code for the specified line begins.- Parameters:
- line- the line number.
- Returns:
- -1 if the specified line is not found.
 
- 
toNearPcReturns the index into the code array at which the code for the specified line (or the nearest line after the specified one) begins.- Parameters:
- line- the line number.
- Returns:
- a pair of the index and the line number of the bytecode at that index.
 
- 
copyMakes a copy.- Overrides:
- copyin class- AttributeInfo
- Parameters:
- newCp- the constant pool table used by the new copy.
- classnames- should be null.
 
 
-