Class DependencyInfo
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.shared.version.DependencyInfo
-
- All Implemented Interfaces:
java.lang.Comparable<DependencyInfo>
public class DependencyInfo extends java.lang.Object implements java.lang.Comparable<DependencyInfo>
Trivial holder class for dependency information, as found within a dependencies.properties file.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringartifactIdprivate static java.lang.StringGROUP_ARTIFACT_SEPARATORprivate java.lang.StringgroupIdprivate java.lang.Stringscopeprivate java.lang.Stringtypeprivate java.lang.Stringversion
-
Constructor Summary
Constructors Constructor Description DependencyInfo(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DependencyInfo that)java.lang.StringgetArtifactId()java.lang.StringgetGroupArtifactKey()java.lang.StringgetGroupId()java.lang.StringgetScope()java.lang.StringgetType()java.lang.StringgetVersion()inthashCode()voidsetScope(java.lang.String scope)Assigns the scope of this DependencyInfo.voidsetType(java.lang.String type)Assigns the type of this DependencyInfo.java.lang.StringtoString()
-
-
-
Field Detail
-
GROUP_ARTIFACT_SEPARATOR
private static final java.lang.String GROUP_ARTIFACT_SEPARATOR
- See Also:
- Constant Field Values
-
groupId
private java.lang.String groupId
-
artifactId
private java.lang.String artifactId
-
version
private java.lang.String version
-
scope
private java.lang.String scope
-
type
private java.lang.String type
-
-
Method Detail
-
getGroupId
public java.lang.String getGroupId()
- Returns:
- The GroupId of this DependencyInfo.
-
getArtifactId
public java.lang.String getArtifactId()
- Returns:
- The ArtifactId of this DependencyInfo.
-
getVersion
public java.lang.String getVersion()
- Returns:
- The Maven version of this DependencyInfo.
-
getType
public java.lang.String getType()
- Returns:
- The type of this DependencyInfo.
-
getScope
public java.lang.String getScope()
- Returns:
- The scope of this DependencyInfo.
-
setType
public void setType(java.lang.String type)
Assigns the type of this DependencyInfo.- Parameters:
type- The non-empty type of this DependencyInfo.
-
setScope
public void setScope(java.lang.String scope)
Assigns the scope of this DependencyInfo.- Parameters:
scope- The non-empty scope of this DependencyInfo.
-
getGroupArtifactKey
public java.lang.String getGroupArtifactKey()
- Returns:
- A key for use within a SortedSet where this DependencyInfo should be sorted.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(DependencyInfo that)
- Specified by:
compareToin interfacejava.lang.Comparable<DependencyInfo>
-
-