Class ModuleId
java.lang.Object
org.apache.ivy.core.module.id.ModuleId
- All Implemented Interfaces:
Comparable<ModuleId>
Identifies a module, without revision information
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternPattern to use to matched mid text representation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic ModuleIdReturns a ModuleIdReturns the encoded String representing this ModuleId.booleanReturns a Map of all attributes of this module id.getName()Returns the name of the module.Returns the name of the organisation.inthashCode()static ModuleIdReturns an intern instance of a ModuleId equals to the given ModuleId if any, or the given ModuleId.static ModuleIdnewInstance(String org, String name) Returns a ModuleId for the given organization and module name.static ModuleIdParses the module id text representation and returns it as aModuleIdinstance.toString()
-
Field Details
-
MID_PATTERN
Pattern to use to matched mid text representation.- See Also:
-
-
Constructor Details
-
ModuleId
-
-
Method Details
-
newInstance
-
intern
Returns an intern instance of a ModuleId equals to the given ModuleId if any, or the given ModuleId.This is useful to reduce the number of instances of ModuleId kept in memory, and thus reduce memory footprint.
- Parameters:
moduleId- the module id to return- Returns:
- a unit instance of the given module id.
-
getName
-
getOrganisation
Returns the name of the organisation.- Returns:
- The name of the organisation.
-
equals
-
hashCode
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ModuleId>
-
encodeToString
Returns the encoded String representing this ModuleId.- Returns:
- The ModuleId encoded as String.
-
getAttributes
-
decode
Returns a ModuleId- Parameters:
encoded- String- Returns:
- The new ModuleId.
- Throws:
IllegalArgumentException- If the given String could not be decoded.
-
parse
Parses the module id text representation and returns it as aModuleIdinstance.- Parameters:
mid- the module id text representation to parse- Returns:
- the ModuleId instance corresponding to the representation
- Throws:
IllegalArgumentException- if the given text representation cannot be parsed
-