public class ReturnValuesTransformerImpl extends java.lang.Object implements ReturnValuesTransformer
ParametersTransformerImpl.| Constructor and Description |
|---|
ReturnValuesTransformerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> ReturnValueTransformation<T> |
addTransformation(java.lang.Class<T> klass,
ReturnValueTransformation<T> transformation)
Adds a transformation that handles objects of the given class.
|
<T> ReturnValueTransformation<T> |
getTransformation(java.lang.Class<T> klass)
Returns an object that transforms objects of type T to strings.
|
<T> void |
transform(java.io.Writer output,
java.lang.Object arg,
java.lang.Class<T> klass)
Transforms the given argument to a string and appends it to the given
writer.
|
<T> void |
transform(java.io.Writer output,
java.lang.Object arg,
java.lang.Class<T> klass,
java.lang.String extraOptions)
Transforms the given argument to a string and appends it to the given
writer.
|
protected <T> ReturnValueTransformation<T> addTransformation(java.lang.Class<T> klass, ReturnValueTransformation<T> transformation)
T - type of the value that will be handled by the
transformationklass - class that is handles by the transformationtransformation - transformation objectpublic <T> ReturnValueTransformation<T> getTransformation(java.lang.Class<T> klass)
ReturnValuesTransformergetTransformation in interface ReturnValuesTransformerT - source type that will be transformed to a stringklass - class for source type Tpublic <T> void transform(java.io.Writer output,
java.lang.Object arg,
java.lang.Class<T> klass)
throws ModuleException,
java.io.IOException
ReturnValuesTransformertransform in interface ReturnValuesTransformerT - source type that will be transformed to a stringoutput - writerarg - argument of class klassklass - type of given argumentModuleException - thrown when the transformation failsjava.io.IOException - thrown when the append to the writer failspublic <T> void transform(java.io.Writer output,
java.lang.Object arg,
java.lang.Class<T> klass,
java.lang.String extraOptions)
throws ModuleException,
java.io.IOException
ReturnValuesTransformertransform in interface ReturnValuesTransformerT - source type that will be transformed to a stringoutput - writerarg - argument of class klassklass - type of given argumentextraOptions - extra options given to the transformationModuleException - thrown when the transformation failsjava.io.IOException - thrown when the append to the writer fails