| java.lang.Object javassist.bytecode.AttributeInfo javassist.bytecode.LocalVariableAttribute
LocalVariableAttribute | public class LocalVariableAttribute extends AttributeInfo (Code) | | LocalVariableTable_attribute or
LocalVariableTypeTable_attribute .
|
Field Summary | |
final public static String | tag The name of this attribute "LocalVariableTable" . | final public static String | typeTag The name of the attribute "LocalVariableTypeTable" . |
Method Summary | |
public void | addEntry(int startPc, int length, int nameIndex, int descriptorIndex, int index) Appends a new entry to local_variable_table . | public int | codeLength(int i) Returns local_variable_table[i].length . | public AttributeInfo | copy(ConstPool newCp, Map classnames) Makes a copy. | public String | descriptor(int i) Returns the type descriptor of the local variable
specified by local_variable_table[i].descriptor_index . | public int | descriptorIndex(int i) Returns the value of
local_variable_table[i].descriptor_index . | public int | index(int i) Returns local_variable_table[i].index . | public int | nameIndex(int i) Returns the value of local_variable_table[i].name_index . | void | shiftPc(int where, int gapLength, boolean exclusive) Adjusts start_pc and length if bytecode is inserted in a method body. | public String | signature(int i) This method is equivalent to descriptor() . | public int | signatureIndex(int i) This method is equivalent to descriptorIndex() . | public int | startPc(int i) Returns local_variable_table[i].start_pc . | public int | tableLength() Returns local_variable_table_length . | public String | variableName(int i) Returns the name of the local variable
specified by local_variable_table[i].name_index . |
tag | final public static String tag(Code) | | The name of this attribute "LocalVariableTable" .
|
typeTag | final public static String typeTag(Code) | | The name of the attribute "LocalVariableTypeTable" .
|
LocalVariableAttribute | public LocalVariableAttribute(ConstPool cp)(Code) | | Constructs an empty LocalVariableTable.
|
addEntry | public void addEntry(int startPc, int length, int nameIndex, int descriptorIndex, int index)(Code) | | Appends a new entry to local_variable_table .
Parameters: startPc - start_pc Parameters: length - length Parameters: nameIndex - name_index Parameters: descriptorIndex - descriptor_index Parameters: index - index |
codeLength | public int codeLength(int i)(Code) | | Returns local_variable_table[i].length .
This represents the length of the code region in which the local
variable is effective.
Parameters: i - the i-th entry. |
copy | public AttributeInfo copy(ConstPool newCp, Map classnames)(Code) | | Makes a copy.
Parameters: newCp - the constant pool table used by the new copy. Parameters: classnames - should be null. |
descriptor | public String descriptor(int i)(Code) | | Returns the type descriptor of the local variable
specified by local_variable_table[i].descriptor_index .
If this attribute represents a LocalVariableTypeTable attribute,
this method returns the type signature of the local variable
specified by local_variable_type_table[i].signature_index .
Parameters: i - the i-th entry. |
descriptorIndex | public int descriptorIndex(int i)(Code) | | Returns the value of
local_variable_table[i].descriptor_index .
This represents the type descriptor of the local variable.
If this attribute represents a LocalVariableTypeTable attribute,
this method returns the value of
local_variable_type_table[i].signature_index .
It represents the type of the local variable.
Parameters: i - the i-th entry. |
index | public int index(int i)(Code) | | Returns local_variable_table[i].index .
This represents the index of the local variable.
Parameters: i - the i-th entry. |
nameIndex | public int nameIndex(int i)(Code) | | Returns the value of local_variable_table[i].name_index .
This represents the name of the local variable.
Parameters: i - the i-th entry. |
shiftPc | void shiftPc(int where, int gapLength, boolean exclusive)(Code) | | Adjusts start_pc and length if bytecode is inserted in a method body.
|
signature | public String signature(int i)(Code) | | This method is equivalent to descriptor() .
If this attribute represents a LocalVariableTypeTable attribute,
this method should be used instead of descriptor()
since the method name is more appropriate.
Parameters: i - the i-th entry. See Also: LocalVariableAttribute.descriptor(int) |
signatureIndex | public int signatureIndex(int i)(Code) | | This method is equivalent to descriptorIndex() .
If this attribute represents a LocalVariableTypeTable attribute,
this method should be used instead of descriptorIndex()
since the method name is more appropriate.
Parameters: i - the i-th entry. See Also: LocalVariableAttribute.descriptorIndex(int) |
startPc | public int startPc(int i)(Code) | | Returns local_variable_table[i].start_pc .
This represents the index into the code array from which the local
variable is effective.
Parameters: i - the i-th entry. |
tableLength | public int tableLength()(Code) | | Returns local_variable_table_length .
This represents the number of entries in the table.
|
variableName | public String variableName(int i)(Code) | | Returns the name of the local variable
specified by local_variable_table[i].name_index .
Parameters: i - the i-th entry. |
|
|