harpoon.IR.RawClass
Class LocalVariableTable

java.lang.Object
  extended by harpoon.IR.RawClass.LocalVariableTable

public class LocalVariableTable
extends Object

Each object indicates a range of code array offsets within which a local variable has a value.

Version:
$Id: LocalVariableTable.java,v 1.2 2002/02/25 21:05:27 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
AttributeLocalVariableTable

Field Summary
 int descriptor_index
          The value of the descriptor_index item must be a valid index into the constant_pool table.
 int index
          The given local variable must be at index in its method's local variables.
 int length
          The given local variable must have a value at indices into the code array in the closed interval [start_pc, start_pc + length].
 int name_index
          The value of the name_index item must be a valid index into the constant_pool table.
protected  ClassFile parent
          ClassFile in which this attribute information is found.
 int start_pc
          The given local variable must have a value at indices into the code array in the closed interval [start_pc, start_pc + length].
 
Constructor Summary
LocalVariableTable(ClassFile parent, int start_pc, int length, int name_index, int descriptor_index, int index)
          Constructor.
 
Method Summary
 ConstantUtf8 descriptor_index()
           
 String descriptor()
           
 int end_pc()
           
 ConstantUtf8 name_index()
           
 String name()
           
 void print(PrintWriter pw, int indent)
          Pretty-print the contents of this attribute.
 void write(ClassDataOutputStream out)
          Writes to bytecode stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected ClassFile parent
ClassFile in which this attribute information is found.


start_pc

public int start_pc
The given local variable must have a value at indices into the code array in the closed interval [start_pc, start_pc + length].

The value of start_pc must be a valid index into the code array of this Code attribute of the opcode of an instruction.


length

public int length
The given local variable must have a value at indices into the code array in the closed interval [start_pc, start_pc + length].

The value of start_pc+length must be either a valid index into the code array of this Code attribute of the opcode of an instruction, or the first index beyond the end of that code array.


name_index

public int name_index
The value of the name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must contain a CONSTANT_Utf8_info structure representing a valid Java local variable name stored as a simple name.


descriptor_index

public int descriptor_index
The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must contain a CONSTANT_Utf8_info structure representing a valid descriptor for a Java local variable. Java local variable descriptors have the same form as field descriptors.


index

public int index
The given local variable must be at index in its method's local variables. If the local variable at index is a two-word type (double or long), it occupies both index and index+1.

Constructor Detail

LocalVariableTable

public LocalVariableTable(ClassFile parent,
                          int start_pc,
                          int length,
                          int name_index,
                          int descriptor_index,
                          int index)
Constructor.

Method Detail

write

public void write(ClassDataOutputStream out)
           throws IOException
Writes to bytecode stream.

Throws:
IOException

name_index

public ConstantUtf8 name_index()

descriptor_index

public ConstantUtf8 descriptor_index()

name

public String name()

descriptor

public String descriptor()

end_pc

public int end_pc()

print

public void print(PrintWriter pw,
                  int indent)
Pretty-print the contents of this attribute.

Parameters:
indent - the indentation level to use.