Package EDU.purdue.cs.bloat.file
Class LocalVariableTable
- java.lang.Object
-
- EDU.purdue.cs.bloat.file.Attribute
-
- EDU.purdue.cs.bloat.file.LocalVariableTable
-
public class LocalVariableTable extends Attribute
LocalVariableTable represents debugging information that may be used by a debugger to determine the value of a given local variable during program execution. It is essentially an array of reflect.LocalDebugInfo.- See Also:
LocalDebugInfo
-
-
Constructor Summary
Constructors Constructor Description LocalVariableTable(java.io.DataInputStream in, int index, int len)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()intlength()Get the length of the attribute.LocalDebugInfo[]locals()Get the local variable debug info for the code.voidsetLocals(LocalDebugInfo[] locals)Set the local variable debug info for the code.java.lang.StringtoString()Returns a string representation of the attribute.voidwriteData(java.io.DataOutputStream out)Write the attribute to a data stream.
-
-
-
Constructor Detail
-
LocalVariableTable
public LocalVariableTable(java.io.DataInputStream in, int index, int len) throws java.io.IOExceptionConstructor. Create an attribute from a data stream.- Parameters:
in- The data stream of the class file.index- The index into the constant pool of the name of the attribute.len- The length of the attribute, excluding the header.- Throws:
java.io.IOException- If an error occurs while reading.
-
-
Method Detail
-
locals
public LocalDebugInfo[] locals()
Get the local variable debug info for the code.- Returns:
- The local variable debug info for the code.
-
setLocals
public void setLocals(LocalDebugInfo[] locals)
Set the local variable debug info for the code.- Parameters:
locals- The local variable debug info for the code.
-
length
public int length()
Get the length of the attribute.
-
toString
public java.lang.String toString()
Description copied from class:AttributeReturns a string representation of the attribute.
-
writeData
public void writeData(java.io.DataOutputStream out) throws java.io.IOExceptionWrite the attribute to a data stream.
-
-