public static final class LocalVariableTableAttribute.LocalVariable extends java.lang.Object implements Node
LocalVariable
denotes a local_variable structure somewhere in a LocalVariableTable_attribute structure.
This class is not thread-safe.
Modifier and Type | Method and Description |
---|---|
LocalVariableTableAttribute.LocalVariable |
copy()
Returns a copy of this
LocalVariable instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of LocalVariable , and that LocalVariable instance is equal to this LocalVariable instance, false otherwise. |
int |
getDescriptorIndex()
Returns the descriptor_index of this
LocalVariable instance. |
int |
getIndex()
Returns the index of this
LocalVariable instance. |
int |
getLength()
Returns the length of this
LocalVariable instance. |
int |
getNameIndex()
Returns the name_index of this
LocalVariable instance. |
int |
getStartPC()
Returns the start_pc of this
LocalVariable instance. |
int |
hashCode()
Returns a hash code for this
LocalVariable instance. |
static LocalVariableTableAttribute.LocalVariable |
newInstance(int startPC,
int length,
int nameIndex,
int descriptorIndex,
int index)
Returns a new
LocalVariable instance. |
void |
setDescriptorIndex(int descriptorIndex)
Sets the descriptor_index for this
LocalVariable instance. |
void |
setIndex(int index)
Sets the index for this
LocalVariable instance. |
void |
setLength(int length)
Sets the length for this
LocalVariable instance. |
void |
setNameIndex(int nameIndex)
Sets the name_index for this
LocalVariable instance. |
void |
setStartPC(int startPC)
Sets the start_pc for this
LocalVariable instance. |
java.lang.String |
toString()
Returns a
String representation of this LocalVariable instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
LocalVariable to dataOutput . |
public LocalVariableTableAttribute.LocalVariable copy()
LocalVariable
instance.LocalVariable
instancepublic java.lang.String toString()
String
representation of this LocalVariable
instance.toString
in class java.lang.Object
String
representation of this LocalVariable
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of LocalVariable
, and that LocalVariable
instance is equal to this LocalVariable
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this LocalVariable
instance for equalitytrue
if, and only if, object
is an instance of LocalVariable
, and that LocalVariable
instance is equal to this LocalVariable
instance, false
otherwisepublic int getDescriptorIndex()
LocalVariable
instance.LocalVariable
instance.public int getIndex()
LocalVariable
instance.LocalVariable
instance.public int getLength()
LocalVariable
instance.LocalVariable
instance.public int getNameIndex()
LocalVariable
instance.LocalVariable
instance.public int getStartPC()
LocalVariable
instance.LocalVariable
instance.public int hashCode()
LocalVariable
instance.hashCode
in class java.lang.Object
LocalVariable
instancepublic void setDescriptorIndex(int descriptorIndex)
LocalVariable
instance.
If descriptorIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
descriptorIndex
- the new descriptor_indexjava.lang.IllegalArgumentException
- thrown if, and only if, descriptorIndex
is less than or equal to 0
public void setIndex(int index)
LocalVariable
instance.index
- the new indexpublic void setLength(int length)
LocalVariable
instance.length
- the new lengthpublic void setNameIndex(int nameIndex)
LocalVariable
instance.
If nameIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
nameIndex
- the new name_indexjava.lang.IllegalArgumentException
- thrown if, and only if, nameIndex
is less than or equal to 0
public void setStartPC(int startPC)
LocalVariable
instance.startPC
- the new start_pcpublic void write(java.io.DataOutput dataOutput)
LocalVariable
to dataOutput
.
If dataOutput
is an OutputStream
(or any other type of stream), this method will not close it.
If dataOutput
is null
, a NullPointerException
will be thrown.
If an I/O-error occurs, an UncheckedIOException
will be thrown.
dataOutput
- the DataOutput
to write tojava.lang.NullPointerException
- thrown if, and only if, dataOutput
is null
java.io.UncheckedIOException
- thrown if, and only if, an I/O-error occurspublic static LocalVariableTableAttribute.LocalVariable newInstance(int startPC, int length, int nameIndex, int descriptorIndex, int index)
LocalVariable
instance.
If either nameIndex
or descriptorIndex
are less than or equal to 0
, an IllegalArgumentException
will be thrown.
startPC
- the start_pclength
- the lengthnameIndex
- the name_indexdescriptorIndex
- the descriptor_indexindex
- the indexLocalVariable
instancejava.lang.IllegalArgumentException
- thrown if, and only if, either nameIndex
or descriptorIndex
are less than or equal to 0