- All Known Implementing Classes:
ModuleDescImpl
A nominal descriptor for a
Module constant.
To create a ModuleDesc for a module, use of(java.lang.String).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the specified object with this descriptor for equality.Returns the module name of this ModuleDesc.static ModuleDescReturns a ModuleDesc for a module, given the name of the module.
-
Method Details
-
of
Returns a ModuleDesc for a module, given the name of the module.Module names are not encoded in "internal form" like class and interface names, that is, the ASCII periods (.) that separate the identifiers in a module name are not replaced by ASCII forward slashes (/).
Module names may be drawn from the entire Unicode codespace, subject to the following constraints:
- A module name must not contain any code point in the range '\u0000' to '\u001F' inclusive.
- The ASCII backslash (\) is reserved for use as an escape character in module names. It must not appear in a module name unless it is followed by an ASCII backslash, an ASCII colon (:), or an ASCII at-sign (@). The ASCII character sequence \\ may be used to encode a backslash in a module name.
- The ASCII colon (:) and at-sign (@) are reserved for future use in module names. They must not appear in module names unless they are escaped. The ASCII character sequences \: and \@ may be used to encode a colon and an at-sign in a module name.
- Parameters:
name- module name- Returns:
- a ModuleDesc describing the desired module
- Throws:
NullPointerException- if the argument isnullIllegalArgumentException- if the name string is not in the correct format
-
moduleName
String moduleName()Returns the module name of this ModuleDesc.- Returns:
- the module name
-
equals
Compare the specified object with this descriptor for equality. Returnstrueif and only if the specified object is also a ModuleDesc and both describe the same module.
-