インタフェースAnnotationElement

すべてのスーパー・インタフェース:
ClassFileElementPREVIEW, WritableElementPREVIEW<AnnotationElementPREVIEW>

public sealed interface AnnotationElement extends WritableElementPREVIEW<AnnotationElementPREVIEW>
AnnotationElementは、JavaプラットフォームのプレビューAPIです。
プレビュー機能が有効な場合のみ、プログラムでAnnotationElementを使用できます。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
注釈のキーと値のペアをモデル化します。
導入されたバージョン:
22
関連項目:
  • メソッドの詳細

    • name

      要素名を返します。
      戻り値:
      要素の名前
    • value

      要素値を返します。
      戻り値:
      エレメント値
    • of

      注釈のキーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      注釈のキーと値のペア
    • of

      注釈のキーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      注釈のキーと値のペア
    • ofClass

      static AnnotationElementPREVIEW ofClass(String name, ClassDesc value)
      class-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      class-valued注釈の注釈キーと値のペア
    • ofString

      static AnnotationElementPREVIEW ofString(String name, String value)
      string-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      string-valued注釈の注釈キーと値のペア
    • ofLong

      static AnnotationElementPREVIEW ofLong(String name, long value)
      long-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      long-valued注釈の注釈キーと値のペア
    • ofInt

      static AnnotationElementPREVIEW ofInt(String name, int value)
      int-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      int-valued注釈の注釈キーと値のペア
    • ofChar

      static AnnotationElementPREVIEW ofChar(String name, char value)
      char-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      char-valued注釈の注釈キーと値のペア
    • ofShort

      static AnnotationElementPREVIEW ofShort(String name, short value)
      short-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      short-valued注釈の注釈キーと値のペア
    • ofByte

      static AnnotationElementPREVIEW ofByte(String name, byte value)
      byte-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      byte-valued注釈の注釈キーと値のペア
    • ofBoolean

      static AnnotationElementPREVIEW ofBoolean(String name, boolean value)
      boolean-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      boolean-valued注釈の注釈キーと値のペア
    • ofDouble

      static AnnotationElementPREVIEW ofDouble(String name, double value)
      double-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      double-valued注釈の注釈キーと値のペア
    • ofFloat

      static AnnotationElementPREVIEW ofFloat(String name, float value)
      float-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      float-valued注釈の注釈キーと値のペア
    • ofAnnotation

      static AnnotationElementPREVIEW ofAnnotation(String name, AnnotationPREVIEW value)
      annotation-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      annotation-valued注釈の注釈キーと値のペア
    • ofArray

      static AnnotationElementPREVIEW ofArray(String name, AnnotationValuePREVIEW... values)
      array-valued注釈の注釈キーと値のペアを返します。
      パラメータ:
      name - キーの名前
      values - 関連付けられた値
      戻り値:
      array-valued注釈の注釈キーと値のペア