public final class ModuleId
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_VERSION |
static java.lang.String |
MODULE_VERSION_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static ModuleId |
create(java.lang.String name)
Creates a new module identifier using the specified name.
|
static ModuleId |
create(java.lang.String name,
java.lang.String version)
Creates a new module identifier using the specified name and version.
|
boolean |
equals(java.lang.Object o) |
static ModuleId |
fromString(java.lang.String moduleId)
Parse a module id from a string.
|
java.lang.String |
getName()
Get the module name.
|
java.lang.String |
getVersion()
Get the module version.
|
int |
hashCode()
Determine the hash code of this module identifier.
|
java.lang.String |
toString()
Get the string representation of this module identifier.
|
public static final java.lang.String DEFAULT_VERSION
public static final java.lang.String MODULE_VERSION_SEPARATOR
public java.lang.String getName()
public java.lang.String getVersion()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
name.version
"
Else, this is constructed as "name
".toString
in class java.lang.Object
public static ModuleId fromString(java.lang.String moduleId) throws java.lang.IllegalArgumentException
moduleId
- the id stringjava.lang.IllegalArgumentException
- if the format of the module specification is invalid or it is null
public static ModuleId create(java.lang.String name, java.lang.String version)
name
- the name of the moduleversion
- the version stringpublic static ModuleId create(java.lang.String name)
name
- the name of the module