インタフェースModuleRequireInfo
public sealed interface ModuleRequireInfo
ModuleAttributeの単一の"requires"宣言をモデル化します。- Java Virtual Machine仕様を参照してください:
-
「4.7.25
Module属性」 - 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明default booleanhas(AccessFlag flag) 特定のアクセス・フラグが設定されているかどうかを返します。static ModuleRequireInfoof(ModuleEntry requires, int requiresFlags, Utf8Entry requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoof(ModuleEntry requires, Collection<AccessFlag> requiresFlags, Utf8Entry requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoof(ModuleDesc requires, int requiresFlags, String requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoof(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) モジュール要件の説明を返します。requires()現在のモジュールが依存するモジュールを返します。default Set<AccessFlag> この必須宣言に関連付けられたフラグを、一連のフラグ列挙として返します。intこのrequire宣言に関連付けられているフラグをビット・マスクとして返します。必要なモジュールが存在する場合は、必要なバージョンを返します。
-
メソッドの詳細
-
requires
-
requiresFlagsMask
int requiresFlagsMask()このrequire宣言に関連付けられているフラグをビット・マスクとして返します。 符号なしshort[0, 0xFFFF]の範囲内です。- 戻り値:
- これに関連付けられたフラグは、ビット・マスクとして宣言を必要とします。
- 関連項目:
-
requiresFlags
default Set<AccessFlag> requiresFlags()この必須宣言に関連付けられたフラグを、一連のフラグ列挙として返します。- 戻り値:
- このフラグに関連付けられたフラグは宣言を必要とします
- スロー:
IllegalArgumentException- フラグ・マスクに未定義のビットが設定されている場合- 関連項目:
-
requiresVersion
-
has
default boolean has(AccessFlag flag) 特定のアクセス・フラグが設定されているかどうかを返します。- パラメータ:
flag- アクセス・フラグ- 戻り値:
- 特定のアクセス・フラグが設定されているかどうか
- 関連項目:
-
of
static ModuleRequireInfo of(ModuleEntry requires, int requiresFlags, Utf8Entry requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン(null)- 戻り値:
- モジュール要件の説明
-
of
static ModuleRequireInfo of(ModuleEntry requires, Collection<AccessFlag> requiresFlags, Utf8Entry requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン(null)- 戻り値:
- モジュール要件の説明
- スロー:
IllegalArgumentException-AccessFlag.Location.MODULE_REQUIRESのロケーションにフラグを適用できない場合
-
of
static ModuleRequireInfo of(ModuleDesc requires, int requiresFlags, String requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン(null)- 戻り値:
- モジュール要件の説明
-
of
static ModuleRequireInfo of(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン(null)- 戻り値:
- モジュール要件の説明
- スロー:
IllegalArgumentException-AccessFlag.Location.MODULE_REQUIRESのロケーションにフラグを適用できない場合
-