public enum InputStreamFormatProcessor extends Enum<InputStreamFormatProcessor> implements FormatProcessor
FormatProcessor
implementation to return an InputStream
from the provided ResolvedArtifact
argument.
Implementation note: This format processor does not use type parameters to be able to process any type inherited from
ResolvedArtifact
.Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
handles(Class resolvedTypeClass)
Checks if the processor is able to process
resolvedTypeClass |
InputStream |
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 InputStreamFormatProcessor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InputStreamFormatProcessor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InputStreamFormatProcessor INSTANCE
public static InputStreamFormatProcessor[] values()
for (InputStreamFormatProcessor c : InputStreamFormatProcessor.values()) System.out.println(c);
public static InputStreamFormatProcessor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic InputStream process(ResolvedArtifact artifact, Class returnType) throws IllegalArgumentException
RESOLVEDTYPE
and returns as the typed return value.process
in interface FormatProcessor
artifact
- The type to be processedreturnType
- The type to be returnedIllegalArgumentException
- If the RESOLVEDTYPE
argument is not specified or nullFormatProcessor.process(ResolvedArtifact, Class)
public boolean handles(Class resolvedTypeClass)
FormatProcessor
resolvedTypeClass
handles
in interface FormatProcessor
resolvedTypeClass
- The type to be processedresolvedTypeClass
or notpublic boolean returns(Class returnTypeClass)
FormatProcessor
returnTypeClass
.returns
in interface FormatProcessor
returnTypeClass
- The type to be returnedreturnTypeClass
or notCopyright © 2021 JBoss by Red Hat. All rights reserved.