IAnnotatedElement.GetAnnotation(Class) メソッド

定義

指定した型に対するこの要素の注釈を返します。そのような注釈が em>present</em> の場合は 、それ以外の場合は <null です。

[Android.Runtime.Register("getAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "GetGetAnnotation_Ljava_lang_Class_Handler:Java.Lang.Reflect.IAnnotatedElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })]
public Java.Lang.Object? GetAnnotation (Java.Lang.Class annotationClass);
[<Android.Runtime.Register("getAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "GetGetAnnotation_Ljava_lang_Class_Handler:Java.Lang.Reflect.IAnnotatedElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })>]
abstract member GetAnnotation : Java.Lang.Class -> Java.Lang.Object

パラメーター

annotationClass
Class

注釈型に対応する Class オブジェクト

戻り値

この要素に存在する場合は、指定された注釈型に対するこの要素の注釈、それ以外の場合は null

属性

注釈

指定した型に対するこの要素の注釈を返します。そのような注釈が em>present</em> の場合は 、それ以外の場合は <null です。

1\.5 で追加されました。

java.lang.reflect.AnnotatedElement.getAnnotation(java.lang.Class<T>)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象