public sealed interface ModuleExportInfo
ModuleExportInfo
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a single "exports" declaration in the
ModuleAttribute
PREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the exported package.default Set
<AccessFlag> Returns the flags associated with this export declaration, as a set of flag values.int
Returns the flags associated with this export declaration, as a bit mask.Returns the list of modules to which this package is exported, if it is a qualified export.default boolean
has
(AccessFlag flag) Returns whether the module has the specified access flag set.static ModuleExportInfoPREVIEW
of
(PackageEntryPREVIEW exports, int exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageEntryPREVIEW exports, int exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEW
of
(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.
-
Method Details
-
exportedPackage
-
exportsFlagsMask
int exportsFlagsMask()Returns the flags associated with this export declaration, as a bit mask. Valid flags includeClassFile.ACC_SYNTHETIC
PREVIEW andClassFile.ACC_MANDATED
PREVIEW.- Returns:
- the flags associated with this export declaration, as a bit mask
-
exportsFlags
Returns the flags associated with this export declaration, as a set of flag values.- Returns:
- the flags associated with this export declaration, as a set of flag values
-
exportsTo
List<ModuleEntryPREVIEW> exportsTo()Returns the list of modules to which this package is exported, if it is a qualified export.- Returns:
- the list of modules to which this package is exported, if it is a qualified export
-
has
Returns whether the module has the specified access flag set.- Parameters:
flag
- the access flag- Returns:
- whether the module has the specified access flag set
-
of
static ModuleExportInfoPREVIEW of(PackageEntryPREVIEW exports, int exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flags, as a bitmaskexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
static ModuleExportInfoPREVIEW of(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flagsexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
static ModuleExportInfoPREVIEW of(PackageEntryPREVIEW exports, int exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flags, as a bitmaskexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
static ModuleExportInfoPREVIEW of(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flagsexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flags, as a bitmaskexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
static ModuleExportInfoPREVIEW of(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flagsexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flags, as a bitmaskexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
of
static ModuleExportInfoPREVIEW of(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo) Returns a module export description.- Parameters:
exports
- the exported packageexportFlags
- the export flagsexportsTo
- the modules to which this package is exported- Returns:
- a module export description
-
ModuleExportInfo
when preview features are enabled.