Langage

Parameter.GetDeclaredAnnotation(Class) Méthode

Définition

Retourne l’annotation de ce paramètre pour le type spécifié si l’annotation est directement présente ; sinon, retourne null.

[Android.Runtime.Register("getDeclaredAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })]
public Java.Lang.Object? GetDeclaredAnnotation(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("getDeclaredAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })>]
abstract member GetDeclaredAnnotation : Java.Lang.Class -> Java.Lang.Object
override this.GetDeclaredAnnotation : Java.Lang.Class -> Java.Lang.Object

Paramètres

annotationClass
Class

l’objet Class correspondant au type d’annotation

Retours

annotation de ce paramètre pour le type d’annotation spécifié s’il est directement présent ; sinon, null

Implémente

Attributs

Remarques

Java documentation pour java.lang.reflect.Parameter.getDeclaredAnnotation(java.lang.Class<T>).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à