|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.graph.Dependency
public final class Dependency
A dependency to some artifact. Note: Instances of this class are immutable and the exposed mutators return new objects rather than changing the current instance.
| Constructor Summary | |
|---|---|
Dependency(Artifact artifact,
java.lang.String scope)
Creates a mandatory dependency on the specified artifact with the given scope. |
|
Dependency(Artifact artifact,
java.lang.String scope,
boolean optional)
Creates a dependency on the specified artifact with the given scope. |
|
Dependency(Artifact artifact,
java.lang.String scope,
boolean optional,
java.util.Collection<Exclusion> exclusions)
Creates a dependency on the specified artifact with the given scope and exclusions. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
Artifact |
getArtifact()
Gets the artifact being depended on. |
java.util.Collection<Exclusion> |
getExclusions()
Gets the exclusions for this dependency. |
java.lang.String |
getScope()
Gets the scope of the dependency. |
int |
hashCode()
|
boolean |
isOptional()
Indicates whether this dependency is optional or not. |
Dependency |
setArtifact(Artifact artifact)
Sets the artifact being depended on. |
Dependency |
setExclusions(java.util.Collection<Exclusion> exclusions)
Sets the exclusions for the dependency. |
Dependency |
setOptional(boolean optional)
Sets the optional flag for the dependency. |
Dependency |
setScope(java.lang.String scope)
Sets the scope of the dependency, e.g. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Dependency(Artifact artifact,
java.lang.String scope)
artifact - The artifact being depended on, must not be null.scope - The scope of the dependency, may be null.
public Dependency(Artifact artifact,
java.lang.String scope,
boolean optional)
artifact - The artifact being depended on, must not be null.scope - The scope of the dependency, may be null.optional - A flag whether the dependency is optional or mandatory.
public Dependency(Artifact artifact,
java.lang.String scope,
boolean optional,
java.util.Collection<Exclusion> exclusions)
artifact - The artifact being depended on, must not be null.scope - The scope of the dependency, may be null.optional - A flag whether the dependency is optional or mandatory.exclusions - The exclusions that apply to transitive dependencies, may be null if none.| Method Detail |
|---|
public Artifact getArtifact()
null.public Dependency setArtifact(Artifact artifact)
artifact - The artifact, must not be null.
null.public java.lang.String getScope()
null.public Dependency setScope(java.lang.String scope)
scope - The scope of the dependency, may be null.
null.public boolean isOptional()
true if the dependency is optional, false otherwise.public Dependency setOptional(boolean optional)
optional - true if the dependency is optional, false if the dependency is mandatory.
null.public java.util.Collection<Exclusion> getExclusions()
null.public Dependency setExclusions(java.util.Collection<Exclusion> exclusions)
exclusions - The exclusions, may be null.
null.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||