- すべてのスーパー・インタフェース:
AttributePREVIEW<ModuleResolutionAttributePREVIEW>
,ClassElementPREVIEW
,ClassFileElementPREVIEW
,WritableElementPREVIEW<ModuleResolutionAttributePREVIEW>
public sealed interface ModuleResolutionAttribute extends AttributePREVIEW<ModuleResolutionAttributePREVIEW>, ClassElementPREVIEW
ModuleResolutionAttribute
は、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
モジュール記述子を表すクラスに指定できる
ModuleResolution
属性をモデル化します。 これは、モジュールの解決メタデータを取得するJDK固有の*属性です。 ClassModel
PREVIEWの要素をトラバースするときに、ClassElement
PREVIEWとして提供されます。
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)
}
この属性は、特定のロケーションにある複数のインスタンスを許可しません。 属性の後続の出現は、属性要素の作成時または変換時に優先されます。
- 導入されたバージョン:
- 22
-
メソッドのサマリー
修飾子と型メソッド説明of
(int resolutionFlags) ModuleResolution
属性を返します。int
resolution_flagsアイテムの値は、モジュール解決のプロパティを示すために使用されるフラグのマスクです。インタフェースjava.lang.classfile.AttributePREVIEWで宣言されたメソッド
attributeMapper, attributeName
インタフェースjava.lang.classfile.WritableElementPREVIEWで宣言されたメソッド
writeTo
-
メソッドの詳細
-
resolutionFlags
int resolutionFlags()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 ModuleResolutionAttributePREVIEW of(int resolutionFlags) ModuleResolution
属性を返します。- パラメータ:
resolutionFlags
- 解決フラグ- 戻り値:
ModuleResolution
属性
-
ModuleResolutionAttribute
を使用できます。