Interface Transformer<T>
- Type Parameters:
T- type of the target object that will be created with the transformer.
- All Known Implementing Classes:
Base64Transformer,BasicTransformer,JsonTransformer
public interface Transformer<T>
Interface for parameter transformers. Implement it to create a new Transformer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Class<Base64Transformer> Convenient access toBase64Transformer, to use in providers (static final Class<JsonTransformer> Convenient access toJsonTransformer, to use in providers ( -
Method Summary
Modifier and TypeMethodDescriptionapplyTransformation(String value, Class<T> targetClass) Apply a transformation on the input value (String)
-
Field Details
-
json
Convenient access toJsonTransformer, to use in providers (provider.withTransformation(json)
) -
base64
Convenient access toBase64Transformer, to use in providers (provider.withTransformation(base64)
)
-
-
Method Details
-
applyTransformation
Apply a transformation on the input value (String)- Parameters:
value- the parameter value to transformtargetClass- class of the target object- Returns:
- a transformed parameter
- Throws:
TransformationException- when a transformation error occurs
-