ShrinkWrap Resolver SPI 2.0.0-cr-1

org.jboss.shrinkwrap.resolver.spi.format
Enum FileFormatProcessor

java.lang.Object
  extended by java.lang.Enum<FileFormatProcessor>
      extended by org.jboss.shrinkwrap.resolver.spi.format.FileFormatProcessor
All Implemented Interfaces:
Serializable, Comparable<FileFormatProcessor>, FormatProcessor

public enum FileFormatProcessor
extends Enum<FileFormatProcessor>
implements FormatProcessor

FormatProcessor implementation to return an File from the provided ResolvedArtifact argument. Implementation note: This format processor does not use type parameters to be able to process any type inherited from ResolvedAritifact.

Author:
Andrew Lee Rubinger, Karel Piwko

Enum Constant Summary
INSTANCE
           
 
Method Summary
 boolean handles(Class resolvedTypeClass)
          Checks if the processor is able to process RESOLVEDTYPE
 File process(ResolvedArtifact artifact, Class returnType)
          Processes the specified RESOLVEDTYPE and returns as the typed return value.
 boolean returns(Class returnTypeClass)
          Checks if the processor is able to return returnTypeClass.
static FileFormatProcessor valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FileFormatProcessor[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final FileFormatProcessor INSTANCE
Method Detail

values

public static FileFormatProcessor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FileFormatProcessor c : FileFormatProcessor.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FileFormatProcessor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

process

public File process(ResolvedArtifact artifact,
                    Class returnType)
             throws IllegalArgumentException
Description copied from interface: FormatProcessor
Processes the specified RESOLVEDTYPE and returns as the typed return value.

Specified by:
process in interface FormatProcessor
Returns:
Throws:
IllegalArgumentException - If the RESOLVEDTYPE argument is not specified or null

handles

public boolean handles(Class resolvedTypeClass)
Description copied from interface: FormatProcessor
Checks if the processor is able to process RESOLVEDTYPE

Specified by:
handles in interface FormatProcessor
Returns:

returns

public boolean returns(Class returnTypeClass)
Description copied from interface: FormatProcessor
Checks if the processor is able to return returnTypeClass.

Specified by:
returns in interface FormatProcessor
Returns:

ShrinkWrap Resolver SPI 2.0.0-cr-1

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