public sealed interface ModuleRequireInfo
ModuleRequireInfoは、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
ModuleAttributePREVIEWの単一の"requires"宣言をモデル化します。- 導入されたバージョン:
- 22
-
メソッドのサマリー
修飾子と型メソッド説明default booleanhas(AccessFlag flag) 特定のアクセス・フラグが設定されているかどうかを返します。static ModuleRequireInfoPREVIEWof(ModuleEntryPREVIEW requires, int requiresFlags, Utf8EntryPREVIEW requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoPREVIEWof(ModuleEntryPREVIEW requires, Collection<AccessFlag> requiresFlags, Utf8EntryPREVIEW requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoPREVIEWof(ModuleDesc requires, int requiresFlags, String requiresVersion) モジュール要件の説明を返します。static ModuleRequireInfoPREVIEWof(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) モジュール要件の説明を返します。requires()現在のモジュールが依存するモジュールを返します。default Set<AccessFlag> アクセス・フラグを返します。intこのrequire宣言に関連付けられているフラグをビット・マスクとして返します。必要なモジュールが存在する場合は、必要なバージョンを返します。
-
メソッドの詳細
-
requires
-
requiresFlagsMask
int requiresFlagsMask()このrequire宣言に関連付けられているフラグをビット・マスクとして返します。 有効なフラグには、ClassFile.ACC_TRANSITIVEPREVIEW、ClassFile.ACC_STATIC_PHASEPREVIEW、ClassFile.ACC_SYNTHETICPREVIEWおよびClassFile.ACC_MANDATEDPREVIEWがあります- 戻り値:
- これに関連付けられたフラグは、ビット・マスクとして宣言を必要とします。
-
requiresFlags
-
requiresVersion
-
has
default boolean has(AccessFlag flag) 特定のアクセス・フラグが設定されているかどうかを返します。- パラメータ:
flag- アクセス・フラグ- 戻り値:
- 特定のアクセス・フラグが設定されているかどうか
-
of
static ModuleRequireInfoPREVIEW of(ModuleEntryPREVIEW requires, int requiresFlags, Utf8EntryPREVIEW requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン- 戻り値:
- モジュール要件の説明
-
of
static ModuleRequireInfoPREVIEW of(ModuleEntryPREVIEW requires, Collection<AccessFlag> requiresFlags, Utf8EntryPREVIEW requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン- 戻り値:
- モジュール要件の説明
-
of
static ModuleRequireInfoPREVIEW of(ModuleDesc requires, int requiresFlags, String requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン- 戻り値:
- モジュール要件の説明
-
of
static ModuleRequireInfoPREVIEW of(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) モジュール要件の説明を返します。- パラメータ:
requires- 必要なモジュールrequiresFlags- 必須フラグrequiresVersion- 必要なバージョン- 戻り値:
- モジュール要件の説明
-
ModuleRequireInfoを使用できます。