gnu.bytecode
Class LineNumbersAttr

java.lang.Object
  extended by gnu.bytecode.Attribute
      extended by gnu.bytecode.LineNumbersAttr

public class LineNumbersAttr
extends Attribute

Represents the contents of a standard "LineNumberTable" attribute.


Constructor Summary
LineNumbersAttr(CodeAttr code)
          Add a new LineNumbersAttr to a CodeAttr.
LineNumbersAttr(short[] numbers, CodeAttr code)
           
 
Method Summary
 int getLength()
          Get the number of line number entries.
 int getLineCount()
           
 short[] getLineNumberTable()
           
 void print(ClassTypeWriter dst)
           
 void put(int linenumber, int PC)
          Add a new line number entry.
 void write(java.io.DataOutputStream dstr)
          Write out the contents of the Attribute.
 
Methods inherited from class gnu.bytecode.Attribute
addToFrontOf, assignConstants, assignConstants, count, get, getContainer, getLengthAll, getName, getNameIndex, getNext, isSkipped, setContainer, setName, setNameIndex, setNext, setSkipped, setSkipped, writeAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineNumbersAttr

public LineNumbersAttr(CodeAttr code)
Add a new LineNumbersAttr to a CodeAttr.


LineNumbersAttr

public LineNumbersAttr(short[] numbers,
                       CodeAttr code)
Method Detail

put

public void put(int linenumber,
                int PC)
Add a new line number entry.

Parameters:
linenumber - the number in the source file for this entry
PC - the byte code location for the code for this line number.

getLength

public final int getLength()
Get the number of line number entries.

Specified by:
getLength in class Attribute

getLineCount

public int getLineCount()

getLineNumberTable

public short[] getLineNumberTable()

write

public void write(java.io.DataOutputStream dstr)
           throws java.io.IOException
Description copied from class: Attribute
Write out the contents of the Attribute. Does not write the 6-byte attribute header.

Specified by:
write in class Attribute
Throws:
java.io.IOException

print

public void print(ClassTypeWriter dst)
Overrides:
print in class Attribute