org.apache.ivy.core.cache

Class ArtifactOrigin

public class ArtifactOrigin extends Object

This class contains information about the origin of an artifact.

See Also: BasicResolver ResolvedResource

Constructor Summary
ArtifactOrigin(Artifact artifact, boolean isLocal, String location)
Create a new instance
Method Summary
booleanequals(Object o)
ArtifactgetArtifact()
Return the artifact that this location is pointing at.
StringgetLocation()
Return the location of the resource (normally a url)
inthashCode()
booleanisLocal()
Is this resource local to this host, i.e. is it on the file system?
static booleanisUnknown(ArtifactOrigin artifact)
static booleanisUnknown(String location)
StringtoString()
static ArtifactOriginunkwnown(Artifact artifact)
ArtifactOrigin instance used when the origin is unknown.

Constructor Detail

ArtifactOrigin

public ArtifactOrigin(Artifact artifact, boolean isLocal, String location)
Create a new instance

Parameters: artifact the artifact pointed by this location. Must not be null. isLocal boolean value indicating if the resource is local (on the filesystem). location the location of the resource (normally a url). Must not be null.

Method Detail

equals

public boolean equals(Object o)

getArtifact

public Artifact getArtifact()
Return the artifact that this location is pointing at.

Returns: the artifact that this location is pointing at.

getLocation

public String getLocation()
Return the location of the resource (normally a url)

Returns: the location of the resource

hashCode

public int hashCode()

isLocal

public boolean isLocal()
Is this resource local to this host, i.e. is it on the file system?

Returns: boolean value indicating if the resource is local.

isUnknown

public static final boolean isUnknown(ArtifactOrigin artifact)

isUnknown

public static final boolean isUnknown(String location)

toString

public String toString()

unkwnown

public static final ArtifactOrigin unkwnown(Artifact artifact)
ArtifactOrigin instance used when the origin is unknown.