public sealed interface ModuleDesc
Module
constant. To create a ModuleDesc
for a module, use the of(String)
method.
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Compare the specified object with this descriptor for equality. |
String |
name() |
Returns the module name of this ModuleDesc . |
static ModuleDesc |
of |
Returns a ModuleDesc for a module, given the name of the module. |
static ModuleDesc of(String name)
ModuleDesc
for a module, given the name of the module.name
- the module nameModuleDesc
describing the desired moduleNullPointerException
- if the argument is null
IllegalArgumentException
- if the name string is not in the correct formatString name()
ModuleDesc
.boolean equals(Object o)
true
if and only if the specified object is also a ModuleDesc
and both describe the same module.
© 1993, 2023, 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/21/docs/api/java.base/java/lang/constant/ModuleDesc.html