インタフェースConstantValueAttribute
- すべてのスーパー・インタフェース:
Attribute<ConstantValueAttribute>
,ClassFileElement
,FieldElement
public sealed interface ConstantValueAttribute extends Attribute<ConstantValueAttribute>, FieldElement
ConstantValue
属性(JVMS 4.7.2)をモデル化します。これは、このフィールドの値が定数であり、その定数値であることを示します。
この属性はフィールドにのみ表示され、フィールドでは「複数のインスタンス」は許可されません。 「定数プール」へのデータ依存性があります。
この属性は、Javaプラットフォーム・バージョン1.0.2、メジャー・バージョン45で導入されました。
- Java Virtual Machine仕様を参照してください:
-
「4.7.2
ConstantValue
属性」 - 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明constant()
フィールドの定数値を返します。static ConstantValueAttribute
of
(ConstantValueEntry value) ConstantValue
属性を返します。static ConstantValueAttribute
of
(ConstantDesc value) ConstantValue
属性を返します。インタフェースjava.lang.classfile.Attributeで宣言されたメソッド
attributeMapper, attributeName
-
メソッドの詳細
-
constant
-
of
static ConstantValueAttribute of(ConstantValueEntry value) ConstantValue
属性を返します。- パラメータ:
value
- 定数値- 戻り値:
ConstantValue
属性
-
of
static ConstantValueAttribute of(ConstantDesc value) ConstantValue
属性を返します。- パラメータ:
value
- 定数値- 戻り値:
ConstantValue
属性
-