ShrinkWrap Resolver Maven API 2.0.0-alpha-4

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

All Superinterfaces:
FormatStage

public interface MavenFormatStage
extends FormatStage

Represents the formatting stage of Maven-based resolution in which the resolved artifact is returned in the desired format. Supports extensible formats by optionally supplying a FormatProcessor

Author:
Andrew Lee Rubinger

Method Summary
 ResolvedArtifactInfo[] as(Class<ResolvedArtifactInfo> type)
          Formats the resultant artifacts as an array of ResolvedArtifactInfos.
 ResolvedArtifactInfo asSingle(Class<ResolvedArtifactInfo> type)
          Formats the resultant artifact as a ResolvedArtifactInfo; assumes a single artifact is returned from resolution.
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.FormatStage
as, as, as, asSingle, asSingle, asSingle
 

Method Detail

as

ResolvedArtifactInfo[] as(Class<ResolvedArtifactInfo> type)
                          throws IllegalArgumentException
Formats the resultant artifacts as an array of ResolvedArtifactInfos. If nothing matches resolution, an empty array will be returned.

Parameters:
type -
Returns:
Throws:
IllegalArgumentException - If the type is not specified

asSingle

ResolvedArtifactInfo asSingle(Class<ResolvedArtifactInfo> type)
                              throws IllegalArgumentException,
                                     NonUniqueResultException,
                                     NoResolvedResultException
Formats the resultant artifact as a ResolvedArtifactInfo; assumes a single artifact is returned from resolution.

Parameters:
type -
Returns:
Throws:
IllegalArgumentException - If the type is not specified
NonUniqueResultException - If the resolution resulted in more than one result
NoResolvedResultException - If the resolution did not yield any result

ShrinkWrap Resolver Maven API 2.0.0-alpha-4

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