インタフェースModuleRequireInfo


public sealed interface ModuleRequireInfo
ModuleAttributeの単一の"requires"宣言をモデル化します。
Java Virtual Machine仕様を参照してください:
「4.7.25 Module属性」
導入されたバージョン:
24
関連項目:
  • メソッドの詳細

    • requires

      ModuleEntry requires()
      現在のモジュールが依存するモジュールを返します。
      戻り値:
      現在のモジュールが依存するモジュール
    • requiresFlagsMask

      int requiresFlagsMask()
      このrequire宣言に関連付けられているフラグをビット・マスクとして返します。 符号なしshort [0, 0xFFFF]の範囲内です。
      戻り値:
      これに関連付けられたフラグは、ビット・マスクとして宣言を必要とします。
      関連項目:
    • requiresFlags

      default Set<AccessFlag> requiresFlags()
      この必須宣言に関連付けられたフラグを、一連のフラグ列挙として返します。
      戻り値:
      このフラグに関連付けられたフラグは宣言を必要とします
      スロー:
      IllegalArgumentException - フラグ・マスクに未定義のビットが設定されている場合
      関連項目:
    • requiresVersion

      Optional<Utf8Entry> 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のロケーションにフラグを適用できない場合