Top Description Inners Fields Constructors Methods
javassist.bytecode

public Class LineNumberAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.Map

LineNumberTable_attribute.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LineNumberAttribute.Pc

Used as a return type of toNearPc().

Field Summary

Modifier and TypeField and Description
public static final String
tag

The name of this attribute "LineNumberTable".

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
pack-priv
private

Method Summary

Modifier and TypeMethod and Description
public AttributeInfo
copy(ConstPool
the constant pool table used by the new copy.
newCp
,
Map<String, String>
should be null.
classnames
)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy.

public int
lineNumber(int
the i-th entry.
i
)

Returns line_number_table[i].line_number.

pack-priv void
shiftPc(int where, int gapLength, boolean exclusive)

Adjusts start_pc if bytecode is inserted in a method body.

public int
startPc(int
the i-th entry.
i
)

Returns line_number_table[i].start_pc.

public int
tableLength()

Returns line_number_table_length.

public int
toLineNumber(int
the index into the code array.
pc
)

Returns the line number corresponding to the specified bytecode.

public LineNumberAttribute.Pc

Returns:

a pair of the index and the line number of the bytecode at that index.
toNearPc
(int
the line number.
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.

public int

Returns:

-1 if the specified line is not found.
toStartPc
(int
the line number.
line
)

Returns the index into the code array at which the code for the specified line begins.

Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClassesgetRefClasseslengthlookupreadremoverenameClassrenameClassrenameClassrenameClasssetwritewriteAll

Field Detail

tagback to summary
public static final String tag

The name of this attribute "LineNumberTable".

Constructor Detail

LineNumberAttributeback to summary
pack-priv LineNumberAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
LineNumberAttributeback to summary
private LineNumberAttribute(ConstPool cp, byte[] i)

Method Detail

copyback to summary
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy.

Parameters
newCp:ConstPool

the constant pool table used by the new copy.

classnames:Map<String, String>

should be null.

Annotations
@Override
lineNumberback to summary
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:int

the i-th entry.

shiftPcback to summary
pack-priv void shiftPc(int where, int gapLength, boolean exclusive)

Adjusts start_pc if bytecode is inserted in a method body.

startPcback to summary
public int startPc(int i)

Returns 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:int

the i-th entry.

tableLengthback to summary
public int tableLength()

Returns line_number_table_length. This represents the number of entries in the table.

toLineNumberback to summary
public int toLineNumber(int pc)

Returns the line number corresponding to the specified bytecode.

Parameters
pc:int

the index into the code array.

toNearPcback to summary
public 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.

Parameters
line:int

the line number.

Returns:LineNumberAttribute.Pc

a pair of the index and the line number of the bytecode at that index.

toStartPcback to summary
public int toStartPc(int line)

Returns the index into the code array at which the code for the specified line begins.

Parameters
line:int

the line number.

Returns:int

-1 if the specified line is not found.

javassist.bytecode back to summary

public Class LineNumberAttribute.Pc

extends Object
Class Inheritance

Used as a return type of toNearPc().

Field Summary

Modifier and TypeField and Description
public int
index

The index into the code array.

public int
line

The line number.

Constructor Summary

AccessConstructor and Description
public
Pc()

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indexback to summary
public int index

The index into the code array.

lineback to summary
public int line

The line number.

Constructor Detail

Pcback to summary
public Pc()