インタフェースAnnotationElement


public sealed interface AnnotationElement
JVMS 4.7.16で定義されているannotation構造またはJVMS 4.7.20で定義されているtype_annotation構造内のelement_value_pairs表の要素と値のペアをモデル化します。

equalsメソッドを使用して、2つのAnnotationElementオブジェクトを比較する必要があります。

Java Virtual Machine仕様を参照してください:
「4.7.16.1 element_value構造体」
導入されたバージョン:
24
関連項目:
  • メソッドの詳細

    • name

      Utf8Entry name()
      要素名を返します。
      APIのノート:
      Javaソース・コードでは、慣例上、単一要素注釈インタフェース内の唯一の要素の名前はvalueです。 (JLS 9.6.1)これは、単一要素注釈(JLS 9.7.3)および複数の注釈(JLS 9.6.3)のコンテナ注釈の場合です。
      戻り値:
      要素の名前
    • value

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

      static AnnotationElement of(Utf8Entry name, AnnotationValue value)
      要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      要素と値のペア
    • of

      static AnnotationElement of(String name, AnnotationValue value)
      要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      要素と値のペア
    • ofClass

      static AnnotationElement ofClass(String name, ClassDesc value)
      クラス値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      クラス値要素の要素と値のペア
      関連項目:
    • ofString

      static AnnotationElement ofString(String name, String value)
      文字列値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      文字列値要素の要素と値のペア
      関連項目:
    • ofLong

      static AnnotationElement ofLong(String name, long value)
      長い値を持つ要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      長い値を持つ要素の要素と値のペア
      関連項目:
    • ofInt

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

      static AnnotationElement ofChar(String name, char value)
      文字値エレメントのエレメントと値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      char値要素の要素と値のペア
      関連項目:
    • ofShort

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

      static AnnotationElement ofByte(String name, byte value)
      バイト値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      バイト値要素の要素と値のペア
      関連項目:
    • ofBoolean

      static AnnotationElement ofBoolean(String name, boolean value)
      ブール値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      ブール値要素の要素と値のペア
      関連項目:
    • ofDouble

      static AnnotationElement ofDouble(String name, double value)
      二重値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      二重値要素の要素と値のペア
      関連項目:
    • ofFloat

      static AnnotationElement ofFloat(String name, float value)
      浮動小数値の要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      value - 関連付けられた値
      戻り値:
      float値要素の要素と値のペア
      関連項目:
    • ofAnnotation

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

      static AnnotationElement ofArray(String name, AnnotationValue... values)
      配列値要素の要素と値のペアを返します。
      パラメータ:
      name - キーの名前
      values - 関連付けられた値
      戻り値:
      配列値要素の要素と値のペア
      関連項目: