Executable.GetParameterAnnotations Method

Definition

Returns an array of arrays of Annotations that represent the annotations on the formal parameters, in declaration order, of the Executable represented by this object.

[Android.Runtime.Register("getParameterAnnotations", "()[[Ljava/lang/annotation/Annotation;", "GetGetParameterAnnotationsHandler", ApiSince=26)]
public abstract Java.Lang.Annotation.IAnnotation[][] GetParameterAnnotations ();
[<Android.Runtime.Register("getParameterAnnotations", "()[[Ljava/lang/annotation/Annotation;", "GetGetParameterAnnotationsHandler", ApiSince=26)>]
abstract member GetParameterAnnotations : unit -> Java.Lang.Annotation.IAnnotation[][]

Returns

an array of arrays that represent the annotations on the formal and implicit parameters, in declaration order, of the executable represented by this object

Attributes

Remarks

Returns an array of arrays of Annotations that represent the annotations on the formal parameters, in declaration order, of the Executable represented by this object. Synthetic and mandated parameters (see explanation below), such as the outer "this" parameter to an inner class constructor will be represented in the returned array. If the executable has no parameters (meaning no formal, no synthetic, and no mandated parameters), a zero-length array will be returned. If the Executable has one or more parameters, a nested array of length zero is returned for each parameter with no annotations. The annotation objects contained in the returned arrays are serializable. The caller of this method is free to modify the returned arrays; it will have no effect on the arrays returned to other callers.

A compiler may add extra parameters that are implicitly declared in source ("mandated"), as well as parameters that are neither implicitly nor explicitly declared in source ("synthetic") to the parameter list for a method. See java.lang.reflect.Parameter for more information.

Java documentation for java.lang.reflect.Executable.getParameterAnnotations().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to