EDU.purdue.cs.bloat.file
Class LineNumberTable
java.lang.Object
|
+--EDU.purdue.cs.bloat.file.Attribute
|
+--EDU.purdue.cs.bloat.file.LineNumberTable
- public class LineNumberTable
- extends Attribute
LineNumberTable is an attribute of a code attribute. A
LineNumberTable stores information that relates indices into the code
array (instructions) to the lines of code in the source file from
which they were compiled. This optional attribute is used with
debuggers (duh) and consists of an array of
reflect.LineNumberDebugInfo.
- See Also:
Code
,
LineNumberDebugInfo
Constructor Summary |
LineNumberTable(java.io.DataInputStream in,
int nameIndex,
int length)
Constructor. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
LineNumberTable
public LineNumberTable(java.io.DataInputStream in,
int nameIndex,
int length)
throws java.io.IOException
- Constructor. Create an attribute from a data stream.
- Parameters:
in
- The data stream of the class file.nameIndex
- The index into the constant pool of the name of the attribute.length
- The length of the attribute, excluding the header.- Throws:
- java.io.IOException - If an error occurs while reading.
lineNumbers
public LineNumberDebugInfo[] lineNumbers()
- Get the line number debug info for the code.
- Returns:
- The line number debug info for the code.
setLineNumbers
public void setLineNumbers(LineNumberDebugInfo[] lineNumbers)
- Set the line number debug info for the code.
- Parameters:
lineNumbers
- The line number debug info for the code.
length
public int length()
- Get the length of the attribute.
- Overrides:
- length in class Attribute
- Returns:
- The length of the attribute.
toString
public java.lang.String toString()
- Description copied from class: Attribute
- Returns a string representation of the attribute.
- Overrides:
- toString in class Attribute
writeData
public void writeData(java.io.DataOutputStream out)
throws java.io.IOException
- Write the attribute to a data stream.
- Overrides:
- writeData in class Attribute
- Parameters:
out
- The data stream of the class file.- Throws:
- java.io.IOException - If an error occurs while writing.
clone
public java.lang.Object clone()
- Overrides:
- clone in class Attribute