- All Known Implementing Classes:
UnboundAttribute.UnboundModuleRequiresInfo
Models a single "requires" declaration in the
ModuleAttribute.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanhas(AccessFlag flag) Returns whether the specific access flag is set.static ModuleRequireInfoof(ModuleDesc requires, int requiresFlags, String requiresVersion) Returns a module requirement description.static ModuleRequireInfoof(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) Returns a module requirement description.static ModuleRequireInfoof(ModuleEntry requires, int requiresFlags, Utf8Entry requiresVersion) Returns a module requirement description.static ModuleRequireInfoof(ModuleEntry requires, Collection<AccessFlag> requiresFlags, Utf8Entry requiresVersion) Returns a module requirement description.requires()Returns The module on which the current module depends.default Set<AccessFlag> Returns the access flags.intReturns the flags associated with this require declaration, as a bit mask.Returns the required version of the required module, if present.
-
Method Details
-
requires
ModuleEntry requires()Returns The module on which the current module depends.- Returns:
- The module on which the current module depends
-
requiresFlagsMask
int requiresFlagsMask()Returns the flags associated with this require declaration, as a bit mask. Valid flags includeClassFile.ACC_TRANSITIVE,ClassFile.ACC_STATIC_PHASE,ClassFile.ACC_SYNTHETICandClassFile.ACC_MANDATED- Returns:
- the flags associated with this require declaration, as a bit mask
-
requiresFlags
Returns the access flags.- Returns:
- the access flags
-
requiresVersion
Returns the required version of the required module, if present.- Returns:
- the required version of the required module, if present
-
has
Returns whether the specific access flag is set.- Parameters:
flag- the access flag- Returns:
- whether the specific access flag is set
-
of
Returns a module requirement description.- Parameters:
requires- the required modulerequiresFlags- the require-specific flagsrequiresVersion- the required version- Returns:
- a module requirement description
-
of
static ModuleRequireInfo of(ModuleEntry requires, Collection<AccessFlag> requiresFlags, Utf8Entry requiresVersion) Returns a module requirement description.- Parameters:
requires- the required modulerequiresFlags- the require-specific flagsrequiresVersion- the required version- Returns:
- a module requirement description
-
of
Returns a module requirement description.- Parameters:
requires- the required modulerequiresFlags- the require-specific flagsrequiresVersion- the required version- Returns:
- a module requirement description
-
of
static ModuleRequireInfo of(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion) Returns a module requirement description.- Parameters:
requires- the required modulerequiresFlags- the require-specific flagsrequiresVersion- the required version- Returns:
- a module requirement description
-