Interface ModuleOpenInfo
public sealed interface ModuleOpenInfo
Models a single "opens" declaration in the
ModuleAttribute
.- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
has
(AccessFlag flag) Returns whether the specified access flag is set.static ModuleOpenInfo
of
(PackageEntry opens, int opensFlags, ModuleEntry... opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageEntry opens, int opensFlags, List<ModuleEntry> opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageEntry opens, Collection<AccessFlag> opensFlags, ModuleEntry... opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageEntry opens, Collection<AccessFlag> opensFlags, List<ModuleEntry> opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageDesc opens, int opensFlags, ModuleDesc... opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageDesc opens, int opensFlags, List<ModuleDesc> opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageDesc opens, Collection<AccessFlag> opensFlags, ModuleDesc... opensTo) Returns a module open description.static ModuleOpenInfo
of
(PackageDesc opens, Collection<AccessFlag> opensFlags, List<ModuleDesc> opensTo) Returns a module open description.Returns the package being opened.default Set
<AccessFlag> Returns the access flags.int
Returns the flags associated with this open declaration, as a bit mask.opensTo()
The list of modules to which this package is opened, if it is a qualified open.
-
Method Details
-
openedPackage
-
opensFlagsMask
int opensFlagsMask()Returns the flags associated with this open declaration, as a bit mask. Valid flags includeClassFile.ACC_SYNTHETIC
andClassFile.ACC_MANDATED
- Returns:
- the flags associated with this open declaration, as a bit mask
-
opensFlags
-
has
Returns whether the specified access flag is set.- Parameters:
flag
- the access flag- Returns:
- whether the specified access flag is set
-
opensTo
List<ModuleEntry> opensTo()The list of modules to which this package is opened, if it is a qualified open.- Returns:
- the modules to which this package is opened
-
of
Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
static ModuleOpenInfo of(PackageEntry opens, Collection<AccessFlag> opensFlags, List<ModuleEntry> opensTo) Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
static ModuleOpenInfo of(PackageEntry opens, Collection<AccessFlag> opensFlags, ModuleEntry... opensTo) Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
static ModuleOpenInfo of(PackageDesc opens, Collection<AccessFlag> opensFlags, List<ModuleDesc> opensTo) Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-
of
static ModuleOpenInfo of(PackageDesc opens, Collection<AccessFlag> opensFlags, ModuleDesc... opensTo) Returns a module open description.- Parameters:
opens
- the package to openopensFlags
- the open flagsopensTo
- the packages to which this package is opened, if it is a qualified open- Returns:
- a module open description
-