public sealed interface ModuleOpenInfo
ModuleAttribute.MethodHandles.privateLookupIn(Class, MethodHandles.Lookup) for more details.Module Attribute| Modifier and Type | Method | Description |
|---|---|---|
default boolean |
has |
Returns whether the open declaration has the specified access flag set. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
static ModuleOpenInfo |
of |
Returns a module open description. |
PackageEntry |
openedPackage() |
Returns the package being opened. |
default Set |
opensFlags() |
Returns the flags associated with this open declaration, as a set of flag enums. |
int |
opensFlagsMask() |
Returns the flags associated with this open declaration, as a bit mask. |
List |
opensTo() |
Returns the modules to which this package is opened, or empty if this is an unqualified open. |
PackageEntry openedPackage()
int opensFlagsMask()
[0, 0xFFFF].default Set<AccessFlag> opensFlags()
IllegalArgumentException - if the flags mask has any undefined bit setdefault boolean has(AccessFlag flag)
flag - the access flagList<ModuleEntry> opensTo()
static ModuleOpenInfo of(PackageEntry opens, int opensFlags, List<ModuleEntry> opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, or empty if this is an unqualified openstatic ModuleOpenInfo of(PackageEntry opens, Collection<AccessFlag> opensFlags, List<ModuleEntry> opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, or empty if this is an unqualified openIllegalArgumentException - if any flag cannot be applied to the AccessFlag.Location.MODULE_OPENS locationstatic ModuleOpenInfo of(PackageEntry opens, int opensFlags, ModuleEntry... opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, or empty if this is an unqualified openstatic ModuleOpenInfo of(PackageEntry opens, Collection<AccessFlag> opensFlags, ModuleEntry... opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, or empty if this is an unqualified openIllegalArgumentException - if any flag cannot be applied to the AccessFlag.Location.MODULE_OPENS locationstatic ModuleOpenInfo of(PackageDesc opens, int opensFlags, List<ModuleDesc> opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, if it is a qualified open, or emptystatic ModuleOpenInfo of(PackageDesc opens, Collection<AccessFlag> opensFlags, List<ModuleDesc> opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the modules to which this package is opened, if it is a qualified open, or emptyIllegalArgumentException - if any flag cannot be applied to the AccessFlag.Location.MODULE_OPENS locationstatic ModuleOpenInfo of(PackageDesc opens, int opensFlags, ModuleDesc... opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the packages to which this package is opened, or empty if this is an unqualified openstatic ModuleOpenInfo of(PackageDesc opens, Collection<AccessFlag> opensFlags, ModuleDesc... opensTo)
opens - the package to openopensFlags - the open flagsopensTo - the packages to which this package is opened, or empty if this is an unqualified openIllegalArgumentException - if any flag cannot be applied to the AccessFlag.Location.MODULE_OPENS location
© 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/ModuleOpenInfo.html