インタフェースModuleAttribute.ModuleAttributeBuilder
- 含まれているインタフェース:
ModuleAttributePREVIEW
public static sealed interface ModuleAttribute.ModuleAttributeBuilder
ModuleAttributeBuilderは、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
モジュール属性のビルダー。
- 導入されたバージョン:
- 22
-
メソッドのサマリー
修飾子と型メソッド説明build()モジュール属性を構築します。exports(ModuleExportInfoPREVIEW exports) エクスポートされたパッケージを追加しますexports(PackageDesc pkge, int exportsFlagsMask, ModuleDesc... exportsToModules) エクスポートされたパッケージを追加しますexports(PackageDesc pkge, Collection<AccessFlag> exportsFlags, ModuleDesc... exportsToModules) エクスポートされたパッケージを追加しますmoduleFlags(int flagsMask) モジュール・フラグを設定しますmoduleFlags(AccessFlag... moduleFlags) モジュール・フラグを設定しますmoduleName(ModuleDesc moduleName) モジュール名を設定しますmoduleVersion(String version) モジュールのバージョンを設定しますopens(ModuleOpenInfoPREVIEW opens) パッケージを開くopens(PackageDesc pkge, int opensFlagsMask, ModuleDesc... opensToModules) パッケージを開くopens(PackageDesc pkge, Collection<AccessFlag> opensFlags, ModuleDesc... opensToModules) パッケージを開くprovides(ModuleProvideInfoPREVIEW provides) サービスの提供を宣言します。サービスの提供を宣言します。requires(ModuleRequireInfoPREVIEW requires) モジュール要件を追加します。requires(ModuleDesc module, int requiresFlagsMask, String version) モジュール要件を追加します。requires(ModuleDesc module, Collection<AccessFlag> requiresFlags, String version) モジュール要件を追加します。uses(ClassEntryPREVIEW uses) サービスの使用を宣言します。サービスの使用を宣言します。
-
メソッドの詳細
-
moduleName
ModuleAttribute.ModuleAttributeBuilderPREVIEW moduleName(ModuleDesc moduleName) モジュール名を設定します- パラメータ:
moduleName- モジュール名- 戻り値:
- このビルダー
-
moduleFlags
ModuleAttribute.ModuleAttributeBuilderPREVIEW moduleFlags(int flagsMask) モジュール・フラグを設定します- パラメータ:
flagsMask- モジュール・フラグ- 戻り値:
- このビルダー
-
moduleFlags
default ModuleAttribute.ModuleAttributeBuilderPREVIEW moduleFlags(AccessFlag... moduleFlags) モジュール・フラグを設定します- パラメータ:
moduleFlags- モジュール・フラグ- 戻り値:
- このビルダー
-
moduleVersion
ModuleAttribute.ModuleAttributeBuilderPREVIEW moduleVersion(String version) モジュールのバージョンを設定します- パラメータ:
version- モジュールのバージョン- 戻り値:
- このビルダー
-
requires
ModuleAttribute.ModuleAttributeBuilderPREVIEW requires(ModuleDesc module, int requiresFlagsMask, String version) モジュール要件を追加します。- パラメータ:
module- 必要なモジュールrequiresFlagsMask- requiresフラグversion- 必要なモジュール・バージョン- 戻り値:
- このビルダー
-
requires
default ModuleAttribute.ModuleAttributeBuilderPREVIEW requires(ModuleDesc module, Collection<AccessFlag> requiresFlags, String version) モジュール要件を追加します。- パラメータ:
module- 必要なモジュールrequiresFlags- requiresフラグversion- 必要なモジュール・バージョン- 戻り値:
- このビルダー
-
requires
ModuleAttribute.ModuleAttributeBuilderPREVIEW requires(ModuleRequireInfoPREVIEW requires) モジュール要件を追加します。- パラメータ:
requires- モジュールには情報が必要です- 戻り値:
- このビルダー
-
exports
ModuleAttribute.ModuleAttributeBuilderPREVIEW exports(PackageDesc pkge, int exportsFlagsMask, ModuleDesc... exportsToModules) エクスポートされたパッケージを追加します- パラメータ:
pkge- エクスポートされたパッケージexportsFlagsMask- エクスポート・フラグexportsToModules- エクスポート先のモジュール- 戻り値:
- このビルダー
-
exports
default ModuleAttribute.ModuleAttributeBuilderPREVIEW exports(PackageDesc pkge, Collection<AccessFlag> exportsFlags, ModuleDesc... exportsToModules) エクスポートされたパッケージを追加します- パラメータ:
pkge- エクスポートされたパッケージexportsFlags- エクスポート・フラグexportsToModules- エクスポート先のモジュール- 戻り値:
- このビルダー
-
exports
ModuleAttribute.ModuleAttributeBuilderPREVIEW exports(ModuleExportInfoPREVIEW exports) エクスポートされたパッケージを追加します- パラメータ:
exports- モジュール・エクスポート情報- 戻り値:
- このビルダー
-
opens
ModuleAttribute.ModuleAttributeBuilderPREVIEW opens(PackageDesc pkge, int opensFlagsMask, ModuleDesc... opensToModules) パッケージを開く- パラメータ:
pkge- 開いたパッケージopensFlagsMask- オープン・パッケージのフラグopensToModules- 開くモジュール- 戻り値:
- このビルダー
-
opens
default ModuleAttribute.ModuleAttributeBuilderPREVIEW opens(PackageDesc pkge, Collection<AccessFlag> opensFlags, ModuleDesc... opensToModules) パッケージを開く- パラメータ:
pkge- 開いたパッケージopensFlags- オープン・パッケージのフラグopensToModules- 開くモジュール- 戻り値:
- このビルダー
-
opens
パッケージを開く- パラメータ:
opens- モジュール・オープン情報- 戻り値:
- このビルダー
-
uses
ModuleAttribute.ModuleAttributeBuilderPREVIEW uses(ClassDesc service) サービスの使用を宣言します。- パラメータ:
service- 使用されるサービス・クラス- 戻り値:
- このビルダー
- 例外:
IllegalArgumentException-serviceがプリミティブ型を表す場合
-
uses
サービスの使用を宣言します。- パラメータ:
uses- 使用されるサービス・クラス- 戻り値:
- このビルダー
-
provides
ModuleAttribute.ModuleAttributeBuilderPREVIEW provides(ClassDesc service, ClassDesc... implClasses) サービスの提供を宣言します。- パラメータ:
service- 提供されたサービス・クラスimplClasses- 実装クラス- 戻り値:
- このビルダー
- 例外:
IllegalArgumentException-serviceまたはimplClassesのいずれかがプリミティブ型を表す場合
-
provides
ModuleAttribute.ModuleAttributeBuilderPREVIEW provides(ModuleProvideInfoPREVIEW provides) サービスの提供を宣言します。- パラメータ:
provides- モジュールは情報を提供します- 戻り値:
- このビルダー
-
build
-
ModuleAttributeBuilderを使用できます。