public class EnumTransformer extends Object implements PropertyTransformer<Enum<?>>
enum{
FILE,
URL
}
will be parsed with string "FILE" but not "file".| Modifier and Type | Field and Description |
|---|---|
static EnumTransformer |
SHARED_INSTANCE
Shared instance of this transformer.
|
| Constructor and Description |
|---|
EnumTransformer() |
| Modifier and Type | Method and Description |
|---|---|
Enum<?> |
transform(String value,
Field field)
Transforms string to enum
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittransformpublic static final EnumTransformer SHARED_INSTANCE
public Enum<?> transform(String value, Field field) throws TransformationException
transform in interface PropertyTransformer<Enum<?>>value - value that will be transformedfield - value will be assigned to this fieldTransformationException - if somehting went wrongCopyright © 2014–2015. All rights reserved.