public final class RuntimeVisibleParameterAnnotationsAttribute extends AttributeInfo
RuntimeVisibleParameterAnnotationsAttribute
denotes a RuntimeVisibleParameterAnnotations_attribute structure somewhere in a ClassFile structure.
This class is not thread-safe.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The name of the RuntimeVisibleParameterAnnotations_attribute structure.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
void |
addParameterAnnotation(Annotations.ParameterAnnotation parameterAnnotation)
Adds
parameterAnnotation to the parameter_annotations of this RuntimeVisibleParameterAnnotationsAttribute instance. |
RuntimeVisibleParameterAnnotationsAttribute |
copy()
Returns a copy of this
RuntimeVisibleParameterAnnotationsAttribute instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of RuntimeVisibleParameterAnnotationsAttribute , and that RuntimeVisibleParameterAnnotationsAttribute instance is equal to this
RuntimeVisibleParameterAnnotationsAttribute instance, false otherwise. |
static java.util.List<RuntimeVisibleParameterAnnotationsAttribute> |
filter(Node node)
Returns a
List with all RuntimeVisibleParameterAnnotationsAttribute s. |
int |
getAttributeLength()
Returns the attribute_length of this
RuntimeVisibleParameterAnnotationsAttribute instance. |
int |
getNumParameters()
Returns the num_parameters of this
RuntimeVisibleParameterAnnotationsAttribute instance. |
java.util.List<Annotations.ParameterAnnotation> |
getParameterAnnotations()
Returns the annotations of this
RuntimeVisibleParameterAnnotationsAttribute instance. |
int |
hashCode()
Returns a hash code for this
RuntimeVisibleParameterAnnotationsAttribute instance. |
static RuntimeVisibleParameterAnnotationsAttribute |
newInstance(int attributeNameIndex)
Returns a new
RuntimeVisibleParameterAnnotationsAttribute instance. |
void |
removeParameterAnnotation(Annotations.ParameterAnnotation parameterAnnotation)
Removes
parameterAnnotation from the parameter_annotations of this RuntimeVisibleParameterAnnotationsAttribute instance. |
java.lang.String |
toString()
Returns a
String representation of this RuntimeVisibleParameterAnnotationsAttribute instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
RuntimeVisibleParameterAnnotationsAttribute to dataOutput . |
getAttributeNameIndex, getName, setAttributeNameIndex
public static final java.lang.String NAME
public java.util.List<Annotations.ParameterAnnotation> getParameterAnnotations()
RuntimeVisibleParameterAnnotationsAttribute
instance.
Modifying the returned List
will not affect this RuntimeVisibleParameterAnnotationsAttribute
instance.
RuntimeVisibleParameterAnnotationsAttribute
instancepublic RuntimeVisibleParameterAnnotationsAttribute copy()
RuntimeVisibleParameterAnnotationsAttribute
instance.copy
in class AttributeInfo
RuntimeVisibleParameterAnnotationsAttribute
instancepublic java.lang.String toString()
String
representation of this RuntimeVisibleParameterAnnotationsAttribute
instance.toString
in class java.lang.Object
String
representation of this RuntimeVisibleParameterAnnotationsAttribute
instancepublic boolean accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
NodeHierarchicalVisitor
.
Returns the result of nodeHierarchicalVisitor.visitLeave(this)
.
If nodeHierarchicalVisitor
is null
, a NullPointerException
will be thrown.
If a RuntimeException
is thrown by the current NodeHierarchicalVisitor
, a NodeTraversalException
will be thrown with the RuntimeException
wrapped.
This implementation will:
NullPointerException
if nodeHierarchicalVisitor
is null
.NodeTraversalException
if nodeHierarchicalVisitor
throws a RuntimeException
.Node
s, if it has any.nodeHierarchicalVisitor
- the NodeHierarchicalVisitor
to acceptnodeHierarchicalVisitor.visitLeave(this)
NodeTraversalException
- thrown if, and only if, a RuntimeException
is thrown by the current NodeHierarchicalVisitor
java.lang.NullPointerException
- thrown if, and only if, nodeHierarchicalVisitor
is null
public boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of RuntimeVisibleParameterAnnotationsAttribute
, and that RuntimeVisibleParameterAnnotationsAttribute
instance is equal to this
RuntimeVisibleParameterAnnotationsAttribute
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this RuntimeVisibleParameterAnnotationsAttribute
instance for equalitytrue
if, and only if, object
is an instance of RuntimeVisibleParameterAnnotationsAttribute
, and that RuntimeVisibleParameterAnnotationsAttribute
instance is equal to this
RuntimeVisibleParameterAnnotationsAttribute
instance, false
otherwisepublic int getAttributeLength()
RuntimeVisibleParameterAnnotationsAttribute
instance.getAttributeLength
in class AttributeInfo
RuntimeVisibleParameterAnnotationsAttribute
instancepublic int getNumParameters()
RuntimeVisibleParameterAnnotationsAttribute
instance.RuntimeVisibleParameterAnnotationsAttribute
instancepublic int hashCode()
RuntimeVisibleParameterAnnotationsAttribute
instance.hashCode
in class java.lang.Object
RuntimeVisibleParameterAnnotationsAttribute
instancepublic void addParameterAnnotation(Annotations.ParameterAnnotation parameterAnnotation)
parameterAnnotation
to the parameter_annotations of this RuntimeVisibleParameterAnnotationsAttribute
instance.
If parameterAnnotation
is null
, a NullPointerException
will be thrown.
parameterAnnotation
- the Annotations.ParameterAnnotation
to addjava.lang.NullPointerException
- thrown if, and only if, parameterAnnotation
is null
public void removeParameterAnnotation(Annotations.ParameterAnnotation parameterAnnotation)
parameterAnnotation
from the parameter_annotations of this RuntimeVisibleParameterAnnotationsAttribute
instance.
If parameterAnnotation
is null
, a NullPointerException
will be thrown.
parameterAnnotation
- the Annotations.ParameterAnnotation
to removejava.lang.NullPointerException
- thrown if, and only if, parameterAnnotation
is null
public void write(java.io.DataOutput dataOutput)
RuntimeVisibleParameterAnnotationsAttribute
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.
write
in class AttributeInfo
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 java.util.List<RuntimeVisibleParameterAnnotationsAttribute> filter(Node node)
List
with all RuntimeVisibleParameterAnnotationsAttribute
s.
All RuntimeVisibleParameterAnnotationsAttribute
s are found by traversing node
using a simple NodeHierarchicalVisitor
implementation.
If node
is null
, a NullPointerException
will be thrown.
node
- the Node
to start traversal fromList
with all RuntimeVisibleParameterAnnotationsAttribute
sjava.lang.NullPointerException
- thrown if, and only if, node
is null
public static RuntimeVisibleParameterAnnotationsAttribute newInstance(int attributeNameIndex)
RuntimeVisibleParameterAnnotationsAttribute
instance.
If attributeNameIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
attributeNameIndex
- the attribute_name_index of the new RuntimeVisibleParameterAnnotationsAttribute
instanceRuntimeVisibleParameterAnnotationsAttribute
instancejava.lang.IllegalArgumentException
- thrown if, and only if, attributeNameIndex
is less than or equal to 0