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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LocalVariableAttributeInfo
public LocalVariableAttributeInfo()
LocalVariableAttributeInfo
public LocalVariableAttributeInfo(ConstantPoolInfo newName,
byte[] newData)
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 writingpool
- 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