インタフェースModuleTargetAttribute
- すべてのスーパー・インタフェース:
Attribute<ModuleTargetAttribute>
,ClassElement
,ClassFileElement
public sealed interface ModuleTargetAttribute extends Attribute<ModuleTargetAttribute>, ClassElement
ModuleTarget
属性をモデル化します。この属性は、ターゲット・プラットフォームの制約を表すために、モジュール記述子「表す」のクラスに指定できます。
ModuleTarget
属性の指定は次のとおりです。
TargetPlatform_attribute {
// index to CONSTANT_utf8_info structure in constant pool representing
// the string "ModuleTarget"
u2 attribute_name_index;
u4 attribute_length;
// index to CONSTANT_utf8_info structure with the target platform
u2 target_platform_index;
}
この属性はクラスにのみ表示され、クラス内の「複数のインスタンス」は許可されません。 「定数プール」へのデータ依存性があります。
この属性は、Java SEプラットフォームでは事前定義されていません。 これは、jlink
およびjmod
ツールを定義するjdk.jlink
モジュールによって生成されるJDK固有の非標準属性です。
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明static ModuleTargetAttribute
ModuleTarget
属性を返します。static ModuleTargetAttribute
ModuleTarget
属性を返します。ターゲット・プラットフォームを返します。インタフェースjava.lang.classfile.Attributeで宣言されたメソッド
attributeMapper, attributeName
-
メソッドの詳細
-
targetPlatform
-
of
static ModuleTargetAttribute of(String targetPlatform) ModuleTarget
属性を返します。- パラメータ:
targetPlatform
- ターゲット・プラットフォーム- 戻り値:
ModuleTarget
属性
-
of
static ModuleTargetAttribute of(Utf8Entry targetPlatform) ModuleTarget
属性を返します。- パラメータ:
targetPlatform
- ターゲット・プラットフォーム- 戻り値:
ModuleTarget
属性
-