IAnnotatedElement.GetDeclaredAnnotation(Class) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne l’annotation de cet élément pour le type spécifié si une telle annotation est <em>directement présente</em>, sinon null.
[Android.Runtime.Register("getDeclaredAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "GetGetDeclaredAnnotation_Ljava_lang_Class_Handler:Java.Lang.Reflect.IAnnotatedElement, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })]
public virtual Java.Lang.Object? GetDeclaredAnnotation(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("getDeclaredAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "GetGetDeclaredAnnotation_Ljava_lang_Class_Handler:Java.Lang.Reflect.IAnnotatedElement, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
[<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 cet élément pour le type d’annotation spécifié s’il est directement présent sur cet élément, sinon null
- Attributs
Remarques
Retourne l’annotation de cet élément pour le type spécifié si une telle annotation est <em>directement présente</em>, sinon null.
Cette méthode ignore les annotations héritées. (Renvoie null si aucune annotation n’est directement présente sur cet élément.)
Ajouté dans la version 1.8.
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.