public static final class MethodParametersAttribute.Parameter extends java.lang.Object implements Node
Parameter
that can be found as a part of any MethodParametersAttribute
instances.
This class is not thread-safe.
Modifier and Type | Field and Description |
---|---|
static int |
ACC_FINAL
This field represents ACC_FINAL in the access_flags element of a parameter structure.
|
static int |
ACC_MANDATED
This field represents ACC_MANDATED in the access_flags element of a parameter structure.
|
static int |
ACC_SYNTHETIC
This field represents ACC_SYNTHETIC in the access_flags element of a parameter structure.
|
Modifier and Type | Method and Description |
---|---|
MethodParametersAttribute.Parameter |
copy()
Returns a copy of this
Parameter instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of Parameter , and that Parameter instance is equal to this Parameter instance, false otherwise. |
int |
getAccessFlags()
Returns the access_flags element of this
Parameter instance. |
int |
getLength()
Returns the length of this
Parameter instance. |
int |
getNameIndex()
Returns the name_index element of this
Parameter instance. |
int |
hashCode()
Returns a hash code for this
Parameter instance. |
boolean |
isFinal()
Returns
true if, and only if, ACC_FINAL is set in the access_flags item of this Parameter instance, false otherwise. |
boolean |
isMandated()
Returns
true if, and only if, ACC_MANDATED is set in the access_flags item of this Parameter instance, false otherwise. |
boolean |
isSynthetic()
Returns
true if, and only if, ACC_SYNTHETIC is set in the access_flags item of this Parameter instance, false otherwise. |
static MethodParametersAttribute.Parameter |
newInstance(int nameIndex,
int accessFlags)
Returns a new
Parameter based on a name_index and access_flags. |
void |
setAccessFlags(int accessFlags)
Sets the access_flags element of this
Parameter instance. |
void |
setNameIndex(int nameIndex)
Sets the name_index element of this
Parameter instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
Parameter to dataOutput . |
public static final int ACC_FINAL
public static final int ACC_MANDATED
public static final int ACC_SYNTHETIC
public MethodParametersAttribute.Parameter copy()
Parameter
instance.Parameter
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of Parameter
, and that Parameter
instance is equal to this Parameter
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this Parameter
instance for equalitytrue
if, and only if, object
is an instance of Parameter
, and that Parameter
instance is equal to this Parameter
instance, false
otherwisepublic boolean isFinal()
true
if, and only if, ACC_FINAL is set in the access_flags item of this Parameter
instance, false
otherwise.true
if, and only if, ACC_FINAL is set in the access_flags item of this Parameter
instance, false
otherwisepublic boolean isMandated()
true
if, and only if, ACC_MANDATED is set in the access_flags item of this Parameter
instance, false
otherwise.true
if, and only if, ACC_MANDATED is set in the access_flags item of this Parameter
instance, false
otherwisepublic boolean isSynthetic()
true
if, and only if, ACC_SYNTHETIC is set in the access_flags item of this Parameter
instance, false
otherwise.true
if, and only if, ACC_SYNTHETIC is set in the access_flags item of this Parameter
instance, false
otherwisepublic int getAccessFlags()
Parameter
instance.Parameter
instancepublic int getLength()
Parameter
instance.Parameter
instancepublic int getNameIndex()
Parameter
instance.Parameter
instancepublic int hashCode()
Parameter
instance.hashCode
in class java.lang.Object
Parameter
instancepublic void setAccessFlags(int accessFlags)
Parameter
instance.
If accessFlags
is invalid, an IllegalArgumentException
will be thrown.
The valid values are the following:
accessFlags
- the new access_flags elementjava.lang.IllegalArgumentException
- thrown if, and only if, accessFlags
is invalidpublic void setNameIndex(int nameIndex)
Parameter
instance.
If nameIndex
is less than 0
, an IllegalArgumentException
will be thrown.
nameIndex
- the new name_index elementjava.lang.IllegalArgumentException
- thrown if, and only if, nameIndex
is less than 0
public void write(java.io.DataOutput dataOutput)
Parameter
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 MethodParametersAttribute.Parameter newInstance(int nameIndex, int accessFlags)
Parameter
based on a name_index and access_flags.
If either nameIndex
is less than 0
or accessFlags
is invalid, an IllegalArgumentException
will be thrown.
The valid values for access_flags are the following:
nameIndex
- the name_index to useaccessFlags
- the access_flags to useParameter
based on a name_index and access_flagsjava.lang.IllegalArgumentException
- thrown if, and only if, either nameIndex
is less than 0
or accessFlags
is invalid