public static final class LocalVariableTypeTableAttribute.LocalVariableType extends java.lang.Object implements Node
LocalVariableType
denotes a local_variable_type structure somewhere in a LocalVariableTypeTable_attribute structure.
This class is not thread-safe.
Modifier and Type | Method and Description |
---|---|
LocalVariableTypeTableAttribute.LocalVariableType |
copy()
Returns a copy of this
LocalVariableType instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of LocalVariableType , and that LocalVariableType instance is equal to this LocalVariableType instance, false
otherwise. |
int |
getIndex()
Returns the index of this
LocalVariableType instance. |
int |
getLength()
Returns the length of this
LocalVariableType instance. |
int |
getNameIndex()
Returns the name_index of this
LocalVariableType instance. |
int |
getSignatureIndex()
Returns the signature_index of this
LocalVariableType instance. |
int |
getStartPC()
Returns the start_pc of this
LocalVariableType instance. |
int |
hashCode()
Returns a hash code for this
LocalVariableType instance. |
static LocalVariableTypeTableAttribute.LocalVariableType |
newInstance(int startPC,
int length,
int nameIndex,
int signatureIndex,
int index)
Returns a new
LocalVariableType instance. |
void |
setIndex(int index)
Sets the index for this
LocalVariableType instance. |
void |
setLength(int length)
Sets the length for this
LocalVariableType instance. |
void |
setNameIndex(int nameIndex)
Sets the name_index for this
LocalVariableType instance. |
void |
setSignatureIndex(int signatureIndex)
Sets the signature_index for this
LocalVariableType instance. |
void |
setStartPC(int startPC)
Sets the start_pc for this
LocalVariableType instance. |
java.lang.String |
toString()
Returns a
String representation of this LocalVariableType instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
LocalVariableType to dataOutput . |
public LocalVariableTypeTableAttribute.LocalVariableType copy()
LocalVariableType
instance.LocalVariableType
instancepublic java.lang.String toString()
String
representation of this LocalVariableType
instance.toString
in class java.lang.Object
String
representation of this LocalVariableType
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of LocalVariableType
, and that LocalVariableType
instance is equal to this LocalVariableType
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this LocalVariableType
instance for equalitytrue
if, and only if, object
is an instance of LocalVariableType
, and that LocalVariableType
instance is equal to this LocalVariableType
instance, false
otherwisepublic int getIndex()
LocalVariableType
instance.LocalVariableType
instance.public int getLength()
LocalVariableType
instance.LocalVariableType
instance.public int getNameIndex()
LocalVariableType
instance.LocalVariableType
instance.public int getSignatureIndex()
LocalVariableType
instance.LocalVariableType
instance.public int getStartPC()
LocalVariableType
instance.LocalVariableType
instance.public int hashCode()
LocalVariableType
instance.hashCode
in class java.lang.Object
LocalVariableType
instancepublic void setIndex(int index)
LocalVariableType
instance.index
- the new indexpublic void setLength(int length)
LocalVariableType
instance.length
- the new lengthpublic void setNameIndex(int nameIndex)
LocalVariableType
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 setSignatureIndex(int signatureIndex)
LocalVariableType
instance.
If signatureIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
signatureIndex
- the new signature_indexjava.lang.IllegalArgumentException
- thrown if, and only if, signatureIndex
is less than or equal to 0
public void setStartPC(int startPC)
LocalVariableType
instance.startPC
- the new start_pcpublic void write(java.io.DataOutput dataOutput)
LocalVariableType
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 LocalVariableTypeTableAttribute.LocalVariableType newInstance(int startPC, int length, int nameIndex, int signatureIndex, int index)
LocalVariableType
instance.
If either nameIndex
or signatureIndex
are less than or equal to 0
, an IllegalArgumentException
will be thrown.
startPC
- the start_pclength
- the lengthnameIndex
- the name_indexsignatureIndex
- the signature_indexindex
- the indexLocalVariableType
instancejava.lang.IllegalArgumentException
- thrown if, and only if, either nameIndex
or signatureIndex
are less than or equal to 0