Langage

AccessibleObject.GetAnnotationsByType(Class) Méthode

Définition

Retourne des annotations du type spécifié associé à cet objet.

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

Paramètres

annotationClass
Class

l’objet Class correspondant au type d’annotation

Retours

Object[]

toutes les annotations du type spécifié associé à cet objet ; sinon, tableau de longueur zéro

Implémente

Attributs

Remarques

Ajouté dans la version 1.8.

Documentation Java pour java.lang.reflect.AccessibleObject.getAnnotationsByType(java.lang.Class<T>).

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

S’applique à