Package gnu.bytecode
Class LineNumbersAttr
java.lang.Object
gnu.bytecode.Attribute
gnu.bytecode.LineNumbersAttr
Represents the contents of a standard "LineNumberTable" attribute.
-
Constructor Summary
ConstructorsConstructorDescriptionLineNumbersAttr
(short[] numbers, CodeAttr code) LineNumbersAttr
(CodeAttr code) Add a new LineNumbersAttr to a CodeAttr. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
Get the number of line number entries.int
short[]
void
print
(ClassTypeWriter dst) void
put
(int linenumber, int PC) Add a new line number entry.void
write
(DataOutputStream dstr) Write out the contents of the Attribute.Methods inherited from class gnu.bytecode.Attribute
addToFrontOf, assignConstants, assignConstants, count, get, getConstants, getContainer, getLengthAll, getName, getNameIndex, getNext, isSkipped, setContainer, setName, setNameIndex, setNext, setSkipped, setSkipped, writeAll
-
Constructor Details
-
LineNumbersAttr
Add a new LineNumbersAttr to a CodeAttr. -
LineNumbersAttr
-
-
Method Details
-
put
public void put(int linenumber, int PC) Add a new line number entry.- Parameters:
linenumber
- the number in the source file for this entryPC
- the byte code location for the code for this line number.
-
getLength
public final int getLength()Get the number of line number entries. -
getLineCount
public int getLineCount() -
getLineNumberTable
public short[] getLineNumberTable() -
write
Description copied from class:Attribute
Write out the contents of the Attribute. Does not write the 6-byte attribute header.- Specified by:
write
in classAttribute
- Throws:
IOException
-
print
-