Interface ModuleExportInfo
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
ModuleAttributePREVIEW.- 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.intReturns 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 booleanhas(AccessFlag flag) Returns whether the module has the specified access flag set.static ModuleExportInfoPREVIEWof(PackageEntryPREVIEW exports, int exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageEntryPREVIEW exports, int exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, ModuleEntryPREVIEW... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageEntryPREVIEW exports, Collection<AccessFlag> exportFlags, List<ModuleEntryPREVIEW> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoPREVIEWof(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_SYNTHETICPREVIEW andClassFile.ACC_MANDATEDPREVIEW.- 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
-
ModuleExportInfowhen preview features are enabled.