com.objectwave.classFile
Class LocalVariableAttributeInfo

java.lang.Object
  |
  +--com.objectwave.classFile.AttributeInfo
        |
        +--com.objectwave.classFile.LocalVariableAttributeInfo

public class LocalVariableAttributeInfo
extends AttributeInfo

A specific attribute info.

Version:
1.2
See Also:
ClassFile

Constructor Summary
LocalVariableAttributeInfo()
           
LocalVariableAttributeInfo(ConstantPoolInfo newName, byte[] newData)
           
 
Method Summary
protected  void fixUpConstants(ClassFile target, ConstantPoolInfo[] originalPool)
           
 ConstantPoolInfo[] getLocals()
           
 java.lang.String getLocalVarName(int idx)
           
 java.lang.String[] getLocalVarNames()
           
 boolean read(java.io.DataInputStream di, ConstantPoolInfo[] pool)
           
protected  void readTableAttributes(ConstantPoolInfo[] pool)
          LocalVariableTable_attribute { u2 attribute_name_index; - reference to "LocalVariableTable" u4 attribute_length; - indicates the length of the attribute, excluding the initial six bytes.
 void write(java.io.DataOutputStream dos, ConstantPoolInfo[] pool)
          Write the bytes to the output stream.
 
Methods inherited from class com.objectwave.classFile.AttributeInfo
toBoolean, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalVariableAttributeInfo

public LocalVariableAttributeInfo()

LocalVariableAttributeInfo

public LocalVariableAttributeInfo(ConstantPoolInfo newName,
                                  byte[] newData)
Method Detail

getLocals

public ConstantPoolInfo[] getLocals()

getLocalVarName

public java.lang.String getLocalVarName(int idx)

getLocalVarNames

public java.lang.String[] getLocalVarNames()

read

public boolean read(java.io.DataInputStream di,
                    ConstantPoolInfo[] pool)
             throws java.io.IOException
Overrides:
read in class AttributeInfo
Parameters:
di -
pool -
Returns:
Throws:
java.io.IOException

readTableAttributes

protected void readTableAttributes(ConstantPoolInfo[] pool)
                            throws java.io.IOException
LocalVariableTable_attribute { u2 attribute_name_index; - reference to "LocalVariableTable" u4 attribute_length; - indicates the length of the attribute, excluding the initial six bytes. u2 local_variable_table_length; - the number of entries in the local_variable_table array { u2 start_pc; u2 length; u2 name_index; - must be a valid index into the constant_pool u2 descriptor_index; u2 index; } local_variable_table[ local_variable_table_length]; }

java.io.IOException

write

public void write(java.io.DataOutputStream dos,
                  ConstantPoolInfo[] pool)
           throws java.io.IOException,
                  java.lang.Exception
Write the bytes to the output stream.

Overrides:
write in class AttributeInfo
Parameters:
dos - The DataOutputStream upon which this is writing
pool - The constant pool in which to index.
Throws:
java.io.IOException
java.lang.Exception

fixUpConstants

protected void fixUpConstants(ClassFile target,
                              ConstantPoolInfo[] originalPool)
                       throws java.lang.Exception
Overrides:
fixUpConstants in class AttributeInfo
Parameters:
target -
originalPool -
Throws:
java.lang.Exception