public class ValueTransformerManager extends Object implements com.google.common.base.Function<Object,Object>
ValueTransformer
objects and then perform value transformation using
registered transformers by invoking apply(Object)
.Modifier and Type | Field and Description |
---|---|
List<ValueTransformer> |
valueTransformers |
Constructor and Description |
---|
ValueTransformerManager() |
Modifier and Type | Method and Description |
---|---|
Object |
apply(Object rawInput)
Use registered transformers to transform given value.
|
ValueTransformerManager |
registerTransformer(ValueTransformer transformer)
Registers new transformer at the end of list so it will be processed after existing transformers.
|
ValueTransformerManager |
registerTransformerAsFirst(ValueTransformer transformer)
Registers new transformer at the beginning of list so it will be processed before existing transformers.
|
public final List<ValueTransformer> valueTransformers
public ValueTransformerManager registerTransformer(ValueTransformer transformer)
transformer
- Transformer to registerpublic ValueTransformerManager registerTransformerAsFirst(ValueTransformer transformer)
transformer
- Transformer to registerpublic Object apply(@Nullable Object rawInput)
apply
in interface com.google.common.base.Function<Object,Object>
rawInput
- Value to transformCannotTransformValueException
- when any of available transformers was able to transform given valueCopyright © 2013 Atlassian. All Rights Reserved.