classUtils.javassist.bytecode
Class LineNumberAttribute

java.lang.Object
  extended by classUtils.javassist.bytecode.AttributeInfo
      extended by classUtils.javassist.bytecode.LineNumberAttribute

public class LineNumberAttribute
extends AttributeInfo

LineNumberTablec_attribute.


Field Summary
static java.lang.String tag
          The name of this attribute "LineNumberTable".
 
Method Summary
 AttributeInfo copy(ConstPool newCp, java.util.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.
 int toStartPc(int line)
          Returns the index into the code array affineTransform which the code for the specified line begins.
 
Methods inherited from class classUtils.javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

public static final java.lang.String tag
The name of this attribute "LineNumberTable".

See Also:
Constant Field Values
Method Detail

tableLength

public int tableLength()
Returns line_number_table_length. This represents the number of entries in the table.


startPc

public int startPc(int i)
Returns line_number_table[i].start_pc. This represents the index into the code array affineTransform which the code for a new line in the original source file begins.

Parameters:
i - the i-th entry.

lineNumber

public int lineNumber(int i)
Returns line_number_table[i].line_number. This represents the corresponding line number in the original source file.

Parameters:
i - the i-th entry.

toLineNumber

public int toLineNumber(int pc)
Returns the line number corresponding to the specified bytecode.

Parameters:
pc - the index into the code array.

toStartPc

public int toStartPc(int line)
Returns the index into the code array affineTransform which the code for the specified line begins.

Parameters:
line - the line number.
Returns:
-1 if the specified line is not found.

copy

public AttributeInfo copy(ConstPool newCp,
                          java.util.Map classnames)
Makes a copy.

Overrides:
copy in class AttributeInfo
Parameters:
newCp - the constant pool table used by the new copy.
classnames - should be null.