インタフェースModuleResolutionAttribute
- すべてのスーパー・インタフェース:
Attribute<ModuleResolutionAttribute>
,ClassElement
,ClassFileElement
public sealed interface ModuleResolutionAttribute extends Attribute<ModuleResolutionAttribute>, ClassElement
ModuleResolution
属性をモデル化します。この属性は、モジュール記述子を「表す」クラス上に表示され、モジュールの解決メタデータを取得します。
ModuleResolution
属性の指定は次のとおりです。
ModuleResolution_attribute {
u2 attribute_name_index; // "ModuleResolution"
u4 attribute_length; // 2
u2 resolution_flags;
The value of the resolution_flags item is a mask of flags used to denote
properties of module resolution. The flags are as follows:
// Optional
0x0001 (DO_NOT_RESOLVE_BY_DEFAULT)
// At most one of:
0x0002 (WARN_DEPRECATED)
0x0004 (WARN_DEPRECATED_FOR_REMOVAL)
0x0008 (WARN_INCUBATING)
}
この属性はクラスにのみ表示され、クラス内の「複数のインスタンス」は許可されません。 「データ依存関係がありません」があります。
この属性は、Java SEプラットフォームでは事前定義されていません。 これは、jlink
およびjmod
ツールを定義するjdk.jlink
モジュールによって生成されるJDK固有の非標準属性です。
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明static ModuleResolutionAttribute
of
(int resolutionFlags) ModuleResolution
属性を返します。int
モジュール解決フラグを返します。インタフェースjava.lang.classfile.Attributeで宣言されたメソッド
attributeMapper, attributeName
-
メソッドの詳細
-
resolutionFlags
int resolutionFlags()モジュール解決フラグを返します。 符号なしshort[0, 0xFFFF]
の範囲内です。resolution_flagsアイテムの値は、モジュール解決のプロパティを示すために使用されるフラグのマスクです。 フラグは次のとおりです。
// Optional 0x0001 (DO_NOT_RESOLVE_BY_DEFAULT) // At most one of: 0x0002 (WARN_DEPRECATED) 0x0004 (WARN_DEPRECATED_FOR_REMOVAL) 0x0008 (WARN_INCUBATING)
- 戻り値:
- モジュール解決フラグ
-
of
static ModuleResolutionAttribute of(int resolutionFlags) ModuleResolution
属性を返します。- パラメータ:
resolutionFlags
- 解決フラグ- 戻り値:
ModuleResolution
属性
-