ShrinkWrap Resolver API 2.0.0-alpha-3

org.jboss.shrinkwrap.resolver.api
Interface FormatStage


public interface FormatStage

Represents the formatting stage of 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
 File[] as(Class<File> type)
          Formats the resultant artifacts as an array of Files.
 InputStream[] as(Class<InputStream> type)
          Formats the resultant artifact as an InputStream.
<RETURNTYPE>
RETURNTYPE[]
as(Class<RETURNTYPE> type, FormatProcessor<RETURNTYPE> processor)
          Formats the resultant artifact as the specified type using the specified FormatProcessor.
 File asSingle(Class<File> type)
          Formats the resultant artifact as a File; assumes a single artifact is returned from resolution.
 InputStream asSingle(Class<InputStream> type)
          Formats the resultant artifact as an InputStream; assumes a single artifact is returned from resolution.
<RETURNTYPE>
RETURNTYPE
asSingle(Class<RETURNTYPE> type, FormatProcessor<RETURNTYPE> processor)
          Formats the resultant artifact as the specified type using the specified FormatProcessor; assumes a single artifact is returned from resolution.
 

Method Detail

as

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

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

asSingle

File asSingle(Class<File> type)
              throws IllegalArgumentException,
                     NonUniqueResultException,
                     NoResolvedResultException
Formats the resultant artifact as a File; 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

as

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

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

asSingle

InputStream asSingle(Class<InputStream> type)
                     throws IllegalArgumentException,
                            NonUniqueResultException,
                            NoResolvedResultException
Formats the resultant artifact as an InputStream; 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

as

<RETURNTYPE> RETURNTYPE[] as(Class<RETURNTYPE> type,
                             FormatProcessor<RETURNTYPE> processor)
                throws IllegalArgumentException
Formats the resultant artifact as the specified type using the specified FormatProcessor. If nothing matches resolution, an empty array will be returned.

Parameters:
type -
processor -
Returns:
Throws:
IllegalArgumentException - If either argument is not specified

asSingle

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

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

ShrinkWrap Resolver API 2.0.0-alpha-3

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