語言

Package.GetDeclaredAnnotationsByType(Class) 方法

定義

新增於1.8版本。

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

參數

annotationClass
Class

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

傳回

Object[]

所有請求型別的註解,皆直接在此程式元素上宣告。

實作

屬性

備註

新增於1.8版本。

Java 文件 java.lang.Package.getDeclaredAnnotationsByType(java.lang.Class<A>)。

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

適用於