Spec-Zone.ru › OpenJDK 25

Interface ModuleExportInfo

public sealed interface ModuleExportInfo
Models a single "exports" declaration in the ModuleAttribute.
See Java Virtual Machine Specification:
4.7.25 The Module Attribute
Since:
24
See Also:
  • ModuleAttribute.exports()
  • ModuleDescriptor.Exports

Method Summary

Modifier and Type Method Description
PackageEntry exportedPackage()
Returns the exported package.
default Set<AccessFlag> exportsFlags()
Returns the flags associated with this export declaration, as a set of flag enums.
int exportsFlagsMask()
Returns the flags associated with this export declaration, as a bit mask.
List<ModuleEntry> exportsTo()
Returns the list of modules to which this package is exported, or empty if this is an unqualified export.
default boolean has(AccessFlag flag)
Returns whether the export declaration has the specified access flag set.
static ModuleExportInfo of(PackageEntry exports, int exportFlags, ModuleEntry... exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageEntry exports, int exportFlags, List<ModuleEntry> exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageEntry exports, Collection<AccessFlag> exportFlags, ModuleEntry... exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageEntry exports, Collection<AccessFlag> exportFlags, List<ModuleEntry> exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo)
Returns a module export description.
static ModuleExportInfo of(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo)
Returns a module export description.

Method Details

exportedPackage

PackageEntry exportedPackage()
Returns the exported package.
Returns:
the exported package
See Also:
  • ModuleDescriptor.Exports.source()

exportsFlagsMask

int 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:
  • ModuleDescriptor.Exports.modifiers()
  • AccessFlag.Location.MODULE_EXPORTS

exportsFlags

default Set<AccessFlag> exportsFlags()
Returns 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:
  • ModuleDescriptor.Exports.accessFlags()
  • AccessFlag.Location.MODULE_EXPORTS

has

default boolean has(AccessFlag flag)
Returns 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:
  • AccessFlag.Location.MODULE_EXPORTS

exportsTo

List<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:
  • ModuleDescriptor.Exports.isQualified()
  • ModuleDescriptor.Exports.targets()

of

static ModuleExportInfo of(PackageEntry exports, int exportFlags, List<ModuleEntry> exportsTo)
Returns 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

of

static 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_EXPORTS location

of

static ModuleExportInfo of(PackageEntry exports, int exportFlags, ModuleEntry... exportsTo)
Returns 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

of

static 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_EXPORTS location

of

static ModuleExportInfo of(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo)
Returns 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

of

static 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_EXPORTS location

of

static ModuleExportInfo of(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo)
Returns 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

of

static 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_EXPORTS location

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/attribute/ModuleExportInfo.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API