語言

Class.GetDeclaredAnnotationsByType(Class) 方法

定義

回傳直接在此類別上宣告的請求註解。

[Android.Runtime.Register("getDeclaredAnnotationsByType", "(Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;", "", ApiSince=34)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.lang.annotation.Annotation" })]
public Java.Lang.Object[] GetDeclaredAnnotationsByType(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("getDeclaredAnnotationsByType", "(Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;", "", ApiSince=34)>]
[<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[]

所請求的註解直接在此類別上宣告。

實作

屬性

例外狀況

若 annotationClass 是 null。

備註

繼承註解則不予考慮。

請注意,此方法回傳的任何註解都是宣告註解。

新增於1.8版本。

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

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

適用於