ShrinkWrap Resolver Maven API 2.0.0-alpha-4

org.jboss.shrinkwrap.resolver.api.maven
Interface ResolvedArtifactInfo


public interface ResolvedArtifactInfo

Encapsulation of a resolved Maven-based artifact's metadata

Author:
Andrew Lee Rubinger

Method Summary
 File getArtifact(Class<File> clazz)
          Returns the resolved artifact as a File; alias for getArtifact(FormatProcessor) passing in argument of FileFormatProcessor
 InputStream getArtifact(Class<InputStream> clazz)
          Returns the resolved artifact as an InputStream; alias for getArtifact(FormatProcessor) passing in argument of InputStreamFormatProcessor
<FORMATTERTYPE extends FormatProcessor<RETURNTYPE>,RETURNTYPE>
RETURNTYPE
getArtifact(FORMATTERTYPE formatter)
          Returns the resolved artifact using the specified FORMATTERTYPE instance
 MavenCoordinate getCoordinate()
          Returns the defined coordinate (ie.
 String getExtension()
          Returns the file extension of this artifact, ie.
 String getResolvedVersion()
          Returns the resolved "version" portion of this artifact's coordinates; SNAPSHOTs may declare a version field (as represented by VersionedMavenCoordinate#getVersion(), which must resolve to a versioned snapshot version number.
 boolean isSnapshotVersion()
          Returns whether or not this artifact is using a SNAPSHOT version.
 

Method Detail

getCoordinate

MavenCoordinate getCoordinate()
Returns the defined coordinate (ie. address) of this resolved artifact.

Returns:

getResolvedVersion

String getResolvedVersion()
Returns the resolved "version" portion of this artifact's coordinates; SNAPSHOTs may declare a version field (as represented by VersionedMavenCoordinate#getVersion(), which must resolve to a versioned snapshot version number. That resolved version number is reflected by this field. In the case of true versions (ie. non-SNAPSHOTs), this call will be equal to VersionedMavenCoordinate#getVersion().

Returns:

isSnapshotVersion

boolean isSnapshotVersion()
Returns whether or not this artifact is using a SNAPSHOT version.

Returns:

getExtension

String getExtension()
Returns the file extension of this artifact, ie. ("jar")

Returns:
The file extension, which is never null

getArtifact

<FORMATTERTYPE extends FormatProcessor<RETURNTYPE>,RETURNTYPE> RETURNTYPE getArtifact(FORMATTERTYPE formatter)
Returns the resolved artifact using the specified FORMATTERTYPE instance

Type Parameters:
FORMATTERTYPE - The type of formatter used
RETURNTYPE - The type returned by the formatter
Parameters:
formatter - The formatter to use
Returns:
The resolved artifact

getArtifact

File getArtifact(Class<File> clazz)
Returns the resolved artifact as a File; alias for getArtifact(FormatProcessor) passing in argument of FileFormatProcessor

Returns:

getArtifact

InputStream getArtifact(Class<InputStream> clazz)
Returns the resolved artifact as an InputStream; alias for getArtifact(FormatProcessor) passing in argument of InputStreamFormatProcessor

Returns:

ShrinkWrap Resolver Maven API 2.0.0-alpha-4

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.