Class.GetDeclaredAnnotationsByType(Class) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳直接在此類別上宣告的請求註解。
[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 所創建與分享的作品,並依授權條款所描述的使用進行修改。