|
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()
DependencyDependency.
getArtifactId in interface Dependencypublic String getGroupId()
DependencyDependency.
getGroupId in interface Dependencypublic String getVersion()
DependencyDependency.
getVersion in interface Dependencypublic String getScopeType()
DependencyDependency
getScopeType in interface Dependencypublic List<Dependency> getExcludedDependencies()
DependencyDependency objects to be excluded from this Dependency's list of inclusions when it
is included in a project.
getExcludedDependencies in interface Dependencypublic ExcludedDependencyBuilder addExclusion()
public String getPackagingType()
DependencyDependency
getPackagingType in interface Dependencypublic PackagingType getPackagingTypeEnum()
DependencyPackagingType of this Dependency, if the type is not one of the default supported types,
PackagingType.OTHER will be returned;
getPackagingTypeEnum in interface Dependencypublic ScopeType getScopeTypeEnum()
DependencyScopeType of this Dependency, if the type is not one of the default supported types,
ScopeType.OTHER will be returned;
getScopeTypeEnum in interface Dependencypublic String getClassifier()
DependencyDependency
getClassifier in interface Dependencypublic 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 Dependencypublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic 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 | |||||||||