Class LineNumberTable
java.lang.Object
EDU.purdue.cs.bloat.file.Attribute
EDU.purdue.cs.bloat.file.LineNumberTable
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:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intlength()Get the length of the attribute.Get the line number debug info for the code.voidsetLineNumbers(LineNumberDebugInfo[] lineNumbers) Set the line number debug info for the code.toString()Returns a string representation of the attribute.voidWrite the attribute to a data stream.
-
Constructor Details
-
LineNumberTable
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:
IOException- If an error occurs while reading.
-
-
Method Details
-
lineNumbers
Get the line number debug info for the code.- Returns:
- The line number debug info for the code.
-
setLineNumbers
Set the line number debug info for the code.- Parameters:
lineNumbers- The line number debug info for the code.
-
length
-
toString
-
writeData
Write the attribute to a data stream.- Specified by:
writeDatain classAttribute- Parameters:
out- The data stream of the class file.- Throws:
IOException- If an error occurs while writing.
-
clone
-