ShrinkWrap Resolver SPI 2.0.0-cr-1

org.jboss.shrinkwrap.resolver.spi.format
Interface FormatProcessor<RESOLVEDTYPE extends ResolvedArtifact<RESOLVEDTYPE>,RETURNTYPE>

Type Parameters:
RESOLVEDTYPE -
RETURNTYPE - Desired format to be returned from the ResolvedArtifact input in FormatProcessor#process(File, Class))
All Known Implementing Classes:
FileFormatProcessor, InputStreamFormatProcessor

public interface FormatProcessor<RESOLVEDTYPE extends ResolvedArtifact<RESOLVEDTYPE>,RETURNTYPE>

Processes an input ResolvedArtifact and returns as a typed format. Any format processor can be registered via SPI. See ServiceLoader for further details.

Author:
Andrew Lee Rubinger, Karel Piwko

Method Summary
 boolean handles(Class<?> resolvedTypeClass)
          Checks if the processor is able to process RESOLVEDTYPE
 RETURNTYPE process(RESOLVEDTYPE input, Class<RETURNTYPE> 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.
 

Method Detail

handles

boolean handles(Class<?> resolvedTypeClass)
Checks if the processor is able to process RESOLVEDTYPE

Parameters:
resolvedTypeClass -
Returns:

returns

boolean returns(Class<?> returnTypeClass)
Checks if the processor is able to return returnTypeClass.

Parameters:
returnTypeClass -
Returns:

process

RETURNTYPE process(RESOLVEDTYPE input,
                   Class<RETURNTYPE> returnType)
                   throws IllegalArgumentException
Processes the specified RESOLVEDTYPE and returns as the typed return value.

Type Parameters:
RESOLVEDTYPE -
Parameters:
input -
returnType -
Returns:
Throws:
IllegalArgumentException - If the RESOLVEDTYPE argument is not specified or null

ShrinkWrap Resolver SPI 2.0.0-cr-1

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