Interface ModuleExportInfo
public sealed interface ModuleExportInfo
Models a single "exports" declaration in the 
ModuleAttribute.- See Java Virtual Machine Specification:
- 
4.7.25 The ModuleAttribute
- Since:
- 24
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionReturns the exported package.default Set<AccessFlag> Returns the flags associated with this export declaration, as a set of flag enums.intReturns the flags associated with this export declaration, as a bit mask.Returns the list of modules to which this package is exported, or empty if this is an unqualified export.default booleanhas(AccessFlag flag) Returns whether the export declaration has the specified access flag set.static ModuleExportInfoof(PackageEntry exports, int exportFlags, ModuleEntry... exportsTo) Returns a module export description.static ModuleExportInfoof(PackageEntry exports, int exportFlags, List<ModuleEntry> exportsTo) Returns a module export description.static ModuleExportInfoof(PackageEntry exports, Collection<AccessFlag> exportFlags, ModuleEntry... exportsTo) Returns a module export description.static ModuleExportInfoof(PackageEntry exports, Collection<AccessFlag> exportFlags, List<ModuleEntry> exportsTo) Returns a module export description.static ModuleExportInfoof(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoof(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.static ModuleExportInfoof(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo) Returns a module export description.static ModuleExportInfoof(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.
- 
Method Details- 
exportedPackagePackageEntry exportedPackage()Returns the exported package.- Returns:
- the exported package
- See Also:
 
- 
exportsFlagsMaskint exportsFlagsMask()Returns the flags associated with this export declaration, as a bit mask. It is in the range of unsigned short,[0, 0xFFFF].- Returns:
- the flags associated with this export declaration, as a bit mask
- See Also:
 
- 
exportsFlagsReturns the flags associated with this export declaration, as a set of flag enums.- Returns:
- the flags associated with this export declaration, as a set of flag enums
- Throws:
- IllegalArgumentException- if the flags mask has any undefined bit set
- See Also:
 
- 
hasReturns whether the export declaration has the specified access flag set.- Parameters:
- flag- the access flag
- Returns:
- whether the export declaration has the specified access flag set
- See Also:
 
- 
exportsToList<ModuleEntry> exportsTo()Returns the list of modules to which this package is exported, or empty if this is an unqualified export.- Returns:
- the list of modules to which this package is exported, or empty if this is an unqualified export
- See Also:
 
- 
ofReturns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags, as a bitmask
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
 
- 
ofstatic ModuleExportInfo of(PackageEntry exports, Collection<AccessFlag> exportFlags, List<ModuleEntry> exportsTo) Returns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
- Throws:
- IllegalArgumentException- if any flag cannot be applied to the- AccessFlag.Location.MODULE_EXPORTSlocation
 
- 
ofReturns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags, as a bitmask
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
 
- 
ofstatic ModuleExportInfo of(PackageEntry exports, Collection<AccessFlag> exportFlags, ModuleEntry... exportsTo) Returns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
- Throws:
- IllegalArgumentException- if any flag cannot be applied to the- AccessFlag.Location.MODULE_EXPORTSlocation
 
- 
ofReturns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags, as a bitmask
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
 
- 
ofstatic ModuleExportInfo of(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo) Returns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
- Throws:
- IllegalArgumentException- if any flag cannot be applied to the- AccessFlag.Location.MODULE_EXPORTSlocation
 
- 
ofReturns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags, as a bitmask
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
 
- 
ofstatic ModuleExportInfo of(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo) Returns a module export description.- Parameters:
- exports- the exported package
- exportFlags- the export flags
- exportsTo- the modules to which this package is exported, or empty if this is an unqualified export
- Returns:
- a module export description
- Throws:
- IllegalArgumentException- if any flag cannot be applied to the- AccessFlag.Location.MODULE_EXPORTSlocation
 
 
-