語言

IAnnotatedElement.GetAnnotations 方法

定義

回傳在此元素上 <em>存在</em> 的註解。

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

傳回

此元素上的註解

屬性

備註

回傳在此元素上 <em>存在</em> 的註解。

若此元素上沒有註解 <em>present</em> ,則回傳值為長度為 0 的陣列。

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

已在1.5中新增。

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

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

適用於