Top Description Fields Constructors Methods
org.jboss.modules.maven

public final Class ArtifactCoordinates

extends Object
Class Inheritance
Imports
java.io.File, java.util.regex.Matcher, .Pattern

Maven artifact coordinate specification.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
private int
pack-priv static final Pattern
private String
private static final Pattern
private final String

Constructor Summary

AccessConstructor and Description
public
ArtifactCoordinates(final String
the group ID (must not be null)
groupId
,
final String
the artifact ID (must not be null)
artifactId
,
final String
the version string (must not be null)
version
,
final String
the classifier string (must not be null, may be empty)
classifier
)

Construct a new instance.

public
ArtifactCoordinates(final String
the group ID (must not be null)
groupId
,
final String
the artifact ID (must not be null)
artifactId
,
final String
the version string (must not be null)
version
)

Construct a new instance with an empty classifier.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the object is equal to this one, false otherwise
equals
(final Object
the target object
obj
)

Overrides java.lang.Object.equals.

Determine whether this coordinates object equals the target object.
public boolean

Returns:

true if the object is equal to this one, false otherwise
equals
(final ArtifactCoordinates
the target object
obj
)

Determine whether this coordinates object equals the target object.

public static ArtifactCoordinates

Returns:

the artifact coordinates object (not null)
fromString
(String
the string to parse (must not be null)
string
)

Parse a string and produce artifact coordinates from it.

public String

Returns:

the artifact ID (not null)
getArtifactId
()

Get the artifact ID.

public String

Returns:

the classifier (not null, may be empty)
getClassifier
()

Get the classifier.

public String

Returns:

the group ID (not null)
getGroupId
()

Get the group ID.

public String

Returns:

the version (not null)
getVersion
()

Get the version.

public int

Returns:

the hash code
hashCode
()

Overrides java.lang.Object.hashCode.

Get the hash code.
public String

Returns:

the path string
relativeArtifactPath
(char
the separator character to use (typically '/' or File#separatorChar)
separator
)

Create a relative repository path for the given artifact coordinates.

public String

Returns:

the path string
relativeArtifactPath
()

Create a relative repository path for the given artifact coordinates with a '/' separator.

public String

Returns:

the string representation
toString
()

Overrides java.lang.Object.toString.

Get the string representation.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

artifactIdback to summary
private final String artifactId
classifierback to summary
private final String classifier
groupIdback to summary
private final String groupId
hashCodeback to summary
private int hashCode
snapshotPatternback to summary
pack-priv static final Pattern snapshotPattern
toStringback to summary
private String toString
VALID_PATTERNback to summary
private static final Pattern VALID_PATTERN
versionback to summary
private final String version

Constructor Detail

ArtifactCoordinatesback to summary
public ArtifactCoordinates(final String groupId, final String artifactId, final String version, final String classifier)

Construct a new instance.

Parameters
groupId:String

the group ID (must not be null)

artifactId:String

the artifact ID (must not be null)

version:String

the version string (must not be null)

classifier:String

the classifier string (must not be null, may be empty)

ArtifactCoordinatesback to summary
public ArtifactCoordinates(final String groupId, final String artifactId, final String version)

Construct a new instance with an empty classifier.

Parameters
groupId:String

the group ID (must not be null)

artifactId:String

the artifact ID (must not be null)

version:String

the version string (must not be null)

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Determine whether this coordinates object equals the target object.

Parameters
obj:Object

the target object

Returns:boolean

true if the object is equal to this one, false otherwise

equalsback to summary
public boolean equals(final ArtifactCoordinates obj)

Determine whether this coordinates object equals the target object.

Parameters
obj:ArtifactCoordinates

the target object

Returns:boolean

true if the object is equal to this one, false otherwise

fromStringback to summary
public static ArtifactCoordinates fromString(String string)

Parse a string and produce artifact coordinates from it.

Parameters
string:String

the string to parse (must not be null)

Returns:ArtifactCoordinates

the artifact coordinates object (not null)

getArtifactIdback to summary
public String getArtifactId()

Get the artifact ID.

Returns:String

the artifact ID (not null)

getClassifierback to summary
public String getClassifier()

Get the classifier.

Returns:String

the classifier (not null, may be empty)

getGroupIdback to summary
public String getGroupId()

Get the group ID.

Returns:String

the group ID (not null)

getVersionback to summary
public String getVersion()

Get the version.

Returns:String

the version (not null)

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Get the hash code.

Returns:int

the hash code

relativeArtifactPathback to summary
public String relativeArtifactPath(char separator)

Create a relative repository path for the given artifact coordinates.

Parameters
separator:char

the separator character to use (typically '/' or File#separatorChar)

Returns:String

the path string

relativeArtifactPathback to summary
public String relativeArtifactPath()

Create a relative repository path for the given artifact coordinates with a '/' separator.

Returns:String

the path string

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Get the string representation.

Returns:String

the string representation