Top Description Fields Constructors Methods
org.jboss.modules

public final Class ModuleIdentifier

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@Deprecated
Imports
java.io.IOException, .ObjectInputStream, .Serializable

Deprecated

This class has been deprecated in favor of name strings; however, programs using identifiers will continue to function correctly.

A unique identifier for a module within a module loader.
Authors
John Bailey, David M. Lloyd, Jason T. Greene

Field Summary

Modifier and TypeField and Description
public static final ModuleIdentifier
CLASSPATH

The class path module (only present if booted from a class path).

private static final String
private transient volatile int
private final String
private static final long
private final String

Constructor Summary

AccessConstructor and Description
private
ModuleIdentifier(final String name, final String slot)

Method Summary

Modifier and TypeMethod and Description
private static int
calculateHashCode(final String name, final String slot)

public static ModuleIdentifier

Returns:

the identifier
create
(final String
the name of the module
name
,
String
the slot this module belongs in
slot
)

Deprecated as a consequence of ModuleIdentifier being deprecated.
Creates a new module identifier using the specified name and slot.
public static ModuleIdentifier

Returns:

the identifier
create
(String
the name of the module
name
)

Deprecated as a consequence of ModuleIdentifier being deprecated.
Creates a new module identifier using the specified name.
public boolean

Returns:

true if they are equal, false otherwise
equals
(Object
the other object
other
)

Overrides java.lang.Object.equals.

Determine whether this object is equal to another.
public boolean

Returns:

true if they are equal, false otherwise
equals
(ModuleIdentifier
the other object
other
)

Deprecated as a consequence of ModuleIdentifier being deprecated.
Determine whether this object is equal to another.
private static String
private static String
public static ModuleIdentifier

Returns:

the module identifier
fromString
(String
the specification string
moduleSpec
)

Deprecated as a consequence of ModuleIdentifier being deprecated.
Parse a module specification from a string.
public String

Returns:

the module name
getName
()

Get the module name.

public String

Returns:

the version slot
getSlot
()

Get the module version slot.

public int

Returns:

the hash code
hashCode
()

Overrides java.lang.Object.hashCode.

Determine the hash code of this module identifier.
private void
public String

Returns:

the string representation
toString
()

Overrides java.lang.Object.toString.

Get the string representation of this module identifier.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

CLASSPATHback to summary
public static final ModuleIdentifier CLASSPATH

Deprecated

as a consequence of ModuleIdentifier being deprecated. See corresponding docs for further information.

The class path module (only present if booted from a class path).

DEFAULT_SLOTback to summary
private static final String DEFAULT_SLOT
hashCodeback to summary
private transient volatile int hashCode
nameback to summary
private final String name
serialVersionUIDback to summary
private static final long serialVersionUID
slotback to summary
private final String slot

Constructor Detail

ModuleIdentifierback to summary
private ModuleIdentifier(final String name, final String slot)

Method Detail

calculateHashCodeback to summary
private static int calculateHashCode(final String name, final String slot)
createback to summary
public static ModuleIdentifier create(final String name, String slot)

Deprecated

as a consequence of ModuleIdentifier being deprecated. See corresponding docs for further information.

Creates a new module identifier using the specified name and slot. A slot allows for multiple modules to exist with the same name. The main usage pattern for this is to differentiate between two incompatible release streams of a module. Normally all module definitions wind up in the "main" slot. An unspecified or null slot will result in placement in the "main" slot. Unless you have a true need for a slot, it should not be specified. When in doubt use the {create(String) method instead.

Parameters
name:String

the name of the module

slot:String

the slot this module belongs in

Returns:ModuleIdentifier

the identifier

createback to summary
public static ModuleIdentifier create(String name)

Deprecated

as a consequence of ModuleIdentifier being deprecated. See corresponding docs for further information.

Creates a new module identifier using the specified name.

Parameters
name:String

the name of the module

Returns:ModuleIdentifier

the identifier

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Determine whether this object is equal to another.

Parameters
other:Object

the other object

Returns:boolean

true if they are equal, false otherwise

equalsback to summary
public boolean equals(ModuleIdentifier other)

Deprecated

as a consequence of ModuleIdentifier being deprecated. See corresponding docs for further information.

Determine whether this object is equal to another.

Parameters
other:ModuleIdentifier

the other object

Returns:boolean

true if they are equal, false otherwise

escapeNameback to summary
private static String escapeName(String name)
escapeSlotback to summary
private static String escapeSlot(String slot)
fromStringback to summary
public static ModuleIdentifier fromString(String moduleSpec) throws IllegalArgumentException

Deprecated

as a consequence of ModuleIdentifier being deprecated. See corresponding docs for further information.

Parse a module specification from a string.

Parameters
moduleSpec:String

the specification string

Returns:ModuleIdentifier

the module identifier

Exceptions
IllegalArgumentException:
if the format of the module specification is invalid or it is null
getNameback to summary
public String getName()

Get the module name.

Returns:String

the module name

getSlotback to summary
public String getSlot()

Get the module version slot.

Returns:String

the version slot

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Determine the hash code of this module identifier.

Returns:int

the hash code

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Get the string representation of this module identifier.

Returns:String

the string representation

Annotations
@Override