モジュール java.base
インタフェースRuntimeVisibleAnnotationsAttribute
- すべてのスーパー・インタフェース:
AttributePREVIEW<RuntimeVisibleAnnotationsAttributePREVIEW>
,ClassElementPREVIEW
,ClassFileElementPREVIEW
,FieldElementPREVIEW
,MethodElementPREVIEW
,WritableElementPREVIEW<RuntimeVisibleAnnotationsAttributePREVIEW>
public sealed interface RuntimeVisibleAnnotationsAttribute extends AttributePREVIEW<RuntimeVisibleAnnotationsAttributePREVIEW>, ClassElementPREVIEW, MethodElementPREVIEW, FieldElementPREVIEW
RuntimeVisibleAnnotationsAttribute
は、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
クラス、メソッドおよびフィールドに表示される
RuntimeVisibleAnnotations
属性4.7.16をモデル化します。 対応するモデル・タイプのトラバース時に、ClassElement
PREVIEW、FieldElement
PREVIEWまたはMethodElement
PREVIEWとして提供されます。
この属性は、特定のロケーションにある複数のインスタンスを許可しません。 属性の後続の出現は、属性要素の作成時または変換時に優先されます。
この属性は、Java SEプラットフォーム・バージョン5.0で導入されました。
- 導入されたバージョン:
- 22
-
メソッドのサマリー
修飾子と型メソッド説明このクラス、フィールドまたはメソッドで実行時に表示される注釈を返します。of
(AnnotationPREVIEW... annotations) RuntimeVisibleAnnotations
属性を返します。of
(List<AnnotationPREVIEW> annotations) RuntimeVisibleAnnotations
属性を返します。インタフェースjava.lang.classfile.AttributePREVIEWで宣言されたメソッド
attributeMapper, attributeName
インタフェースjava.lang.classfile.WritableElementPREVIEWで宣言されたメソッド
writeTo
-
メソッドの詳細
-
annotations
List<AnnotationPREVIEW> annotations()このクラス、フィールドまたはメソッドで実行時に表示される注釈を返します。- 戻り値:
- このクラス、フィールドまたはメソッドの実行時に表示される注釈
-
of
static RuntimeVisibleAnnotationsAttributePREVIEW of(List<AnnotationPREVIEW> annotations) RuntimeVisibleAnnotations
属性を返します。- パラメータ:
annotations
- 注釈- 戻り値:
RuntimeVisibleAnnotations
属性
-
of
static RuntimeVisibleAnnotationsAttributePREVIEW of(AnnotationPREVIEW... annotations) RuntimeVisibleAnnotations
属性を返します。- パラメータ:
annotations
- 注釈- 戻り値:
RuntimeVisibleAnnotations
属性
-
RuntimeVisibleAnnotationsAttribute
を使用できます。