|
Forge - Parent 1.0.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.forge.project.dependencies.DependencyBuilder
public class DependencyBuilder
Builder to create Dependency
objects. This class implements Dependency
for easy consumption. (I.e.:
Use this class wherever you need to create and use a new Dependency
)
Constructor Summary | |
---|---|
protected |
DependencyBuilder()
|
Method Summary | |
---|---|
ExcludedDependencyBuilder |
addExclusion()
|
static boolean |
areEquivalent(Dependency l,
Dependency r)
Return true if the groupId and artifactId of the two given dependencies are equal. |
static DependencyBuilder |
create()
Obtain a new DependencyBuilder instance. |
static DependencyBuilder |
create(Dependency dep)
|
static DependencyBuilder |
create(String identifier)
|
boolean |
equals(Object obj)
|
String |
getArtifactId()
Get the minor-identifier for this Dependency . |
String |
getClassifier()
Get the classifier for this Dependency |
List<Dependency> |
getExcludedDependencies()
Get a list of Dependency objects to be excluded from this Dependency 's list of inclusions when it
is included in a project. |
String |
getGroupId()
Get the major identifier for this Dependency . |
String |
getPackagingType()
Get the specified packaging type of this Dependency |
PackagingType |
getPackagingTypeEnum()
Get the PackagingType of this Dependency , if the type is not one of the default supported types,
PackagingType.OTHER will be returned; |
String |
getScopeType()
Get the scope type of this Dependency |
ScopeType |
getScopeTypeEnum()
Get the ScopeType of this Dependency , if the type is not one of the default supported types,
ScopeType.OTHER will be returned; |
String |
getVersion()
Get the version of this Dependency . |
int |
hashCode()
|
DependencyBuilder |
setArtifactId(String artifactId)
|
DependencyBuilder |
setClassifier(String classifier)
|
DependencyBuilder |
setGroupId(String groupId)
|
DependencyBuilder |
setPackagingType(PackagingType type)
|
DependencyBuilder |
setPackagingType(String type)
|
DependencyBuilder |
setScopeType(ScopeType scope)
|
DependencyBuilder |
setScopeType(String scope)
|
DependencyBuilder |
setVersion(String version)
|
String |
toCoordinates()
Return a string represenging this dependency in the form of a standard identifier. |
static String |
toId(Dependency dep)
Convenience method which should be used to convert a Dependency object into its id representation, for
example: "groupId:artifactId:::version", "groupId:artifactId:packaging::version" or
"groupId:artifactId:packaging:classifier:version" |
String |
toString()
|
static String |
toString(Dependency dep)
Convenience method which should be used to convert a Dependency object into its string representation, for
example: "groupId:artifactId:version:scope:packaging" |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected DependencyBuilder()
Method Detail |
---|
public static DependencyBuilder create()
DependencyBuilder
instance.
public static DependencyBuilder create(Dependency dep)
public static boolean areEquivalent(Dependency l, Dependency r)
public static DependencyBuilder create(String identifier)
identifier
- of the form "groupId:artifactId", "groupId:artifactId:version",
"groupId:artifactId:scope, "groupId
:artifactId:version:scope", "groupId:artifactId:version:scope:packaging"
For classifier specification, see setClassifier(String)
public DependencyBuilder setGroupId(String groupId)
public DependencyBuilder setArtifactId(String artifactId)
public DependencyBuilder setVersion(String version)
public DependencyBuilder setScopeType(ScopeType scope)
public DependencyBuilder setScopeType(String scope)
public DependencyBuilder setPackagingType(PackagingType type)
public DependencyBuilder setPackagingType(String type)
public DependencyBuilder setClassifier(String classifier)
public String getArtifactId()
Dependency
Dependency
.
getArtifactId
in interface Dependency
public String getGroupId()
Dependency
Dependency
.
getGroupId
in interface Dependency
public String getVersion()
Dependency
Dependency
.
getVersion
in interface Dependency
public String getScopeType()
Dependency
Dependency
getScopeType
in interface Dependency
public List<Dependency> getExcludedDependencies()
Dependency
Dependency
objects to be excluded from this Dependency
's list of inclusions when it
is included in a project.
getExcludedDependencies
in interface Dependency
public ExcludedDependencyBuilder addExclusion()
public String getPackagingType()
Dependency
Dependency
getPackagingType
in interface Dependency
public PackagingType getPackagingTypeEnum()
Dependency
PackagingType
of this Dependency
, if the type is not one of the default supported types,
PackagingType.OTHER
will be returned;
getPackagingTypeEnum
in interface Dependency
public ScopeType getScopeTypeEnum()
Dependency
ScopeType
of this Dependency
, if the type is not one of the default supported types,
ScopeType.OTHER
will be returned;
getScopeTypeEnum
in interface Dependency
public String getClassifier()
Dependency
Dependency
getClassifier
in interface Dependency
public static String toId(Dependency dep)
Dependency
object into its id representation, for
example: "groupId:artifactId:::version", "groupId:artifactId:packaging::version" or
"groupId:artifactId:packaging:classifier:version"
Dependency#toCoordinates()}
public static String toString(Dependency dep)
Dependency
object into its string representation, for
example: "groupId:artifactId:version:scope:packaging"
public String toCoordinates()
Dependency
toCoordinates
in interface Dependency
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
Forge - Parent 1.0.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |