語言

Package.GetDeclaredAnnotation(Class) 方法

定義

新增 1.

[Android.Runtime.Register("getDeclaredAnnotation", "(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;", "GetGetDeclaredAnnotation_Ljava_lang_Class_Handler", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A 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", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.annotation.Annotation" })>]
abstract member GetDeclaredAnnotation : Java.Lang.Class -> Java.Lang.Object
override this.GetDeclaredAnnotation : Java.Lang.Class -> Java.Lang.Object

參數

annotationClass
Class

Class代表所請求註解類型的物件。

傳回

請求的註解會直接在這個程式元素上宣告,或 null 在該元件不存在時宣告。

實作

屬性

備註

新增於1.8版本。

java.lang.Package.getDeclaredAnnotation(java.lang.Class<A>)Java 檔。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於