Top Description Methods
java.lang.classfile.attribute

public sealed Interface RuntimeVisibleParameterAnnotationsAttribute

extends Attribute<RuntimeVisibleParameterAnnotationsAttribute>, MethodElement
Known Direct Implementers
jdk.internal.classfile.impl.BoundAttribute.BoundRuntimeVisibleParameterAnnotationsAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundRuntimeVisibleParameterAnnotationsAttribute
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.util.List, java.lang.classfile.Annotation, .Attribute, .MethodElement, .MethodModel, jdk.internal.classfile.impl.BoundAttribute, .UnboundAttribute, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use RuntimeVisibleParameterAnnotationsAttribute when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models the RuntimeVisibleParameterAnnotations attribute 4.7.18, which can appear on methods. Delivered as a java.lang.classfile.MethodElement when traversing a MethodModel.

API Note

The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.

The attribute was introduced in the Java SE Platform version 5.0.

Since
22

Method Summary

Modifier and TypeMethod and Description
public static RuntimeVisibleParameterAnnotationsAttribute

Returns:

a RuntimeVisibleParameterAnnotations attribute
of
(List<List<Annotation>>
a list of parameter annotations for each parameter
parameterAnnotations
)

Returns a RuntimeVisibleParameterAnnotations attribute.

public List<List<Annotation>>

Returns:

the list of annotations corresponding to each method parameter
parameterAnnotations
()

Returns the list of annotations corresponding to each method parameter.

Inherited from java.lang.classfile.Attribute:
attributeMapperattributeName

Method Detail

ofback to summary
public static RuntimeVisibleParameterAnnotationsAttribute of(List<List<Annotation>> parameterAnnotations)

Returns a RuntimeVisibleParameterAnnotations attribute.

Parameters
parameterAnnotations:List<List<Annotation>>

a list of parameter annotations for each parameter

Returns:RuntimeVisibleParameterAnnotationsAttribute

a RuntimeVisibleParameterAnnotations attribute

parameterAnnotationsback to summary
public List<List<Annotation>> parameterAnnotations()

Returns the list of annotations corresponding to each method parameter. The element at the i'th index corresponds to the annotations on the i'th parameter.

Returns:List<List<Annotation>>

the list of annotations corresponding to each method parameter