語言

IAnnotatedElement.GetDeclaredAnnotations 方法

定義

回傳直接<>存在<於此元素上的>註解。

[Android.Runtime.Register("getDeclaredAnnotations", "()[Ljava/lang/annotation/Annotation;", "GetGetDeclaredAnnotationsHandler:Java.Lang.Reflect.IAnnotatedElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Annotation.IAnnotation[] GetDeclaredAnnotations();
[<Android.Runtime.Register("getDeclaredAnnotations", "()[Ljava/lang/annotation/Annotation;", "GetGetDeclaredAnnotationsHandler:Java.Lang.Reflect.IAnnotatedElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetDeclaredAnnotations : unit -> Java.Lang.Annotation.IAnnotation[]

傳回

直接存在於此元素上的註解

屬性

備註

回傳直接<>存在<於此元素上的>註解。 此方法忽略繼承的註解。

如果此元素上沒有直接<>存在 em<的註解>,則回傳值為長度為 0 的陣列。

呼叫者可自由修改回傳陣列;它不會影響回傳給其他呼叫者的陣列。

已在1.5中新增。

Java 文件 java.lang.reflect.AnnotatedElement.getDeclaredAnnotations()

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

適用於