public abstract class BaseValueConverter<S,T> extends Object implements ValueConverter<S,T>
Base class for converter implementations.
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsSourceValue(Object value)
Returns true if the converter knows how to convert the given source value to the target type.
|
boolean |
acceptsTargetType(Class<?> clazz)
Returns true if the converter knows how to convert the given target type to the source type.
|
boolean |
acceptsTargetValue(Object value)
Returns true if the converter knows how to convert the given target value to the source type.
|
S |
convertToSourceType(Object value)
Converts the given target value to the source type.
|
T |
convertToTargetType(Object value)
Converts the given source value to the target type.
|
String |
getName()
The name of the converter.
|
public String getName()
ValueConverterThe name of the converter.
getName in interface ValueConverter<S,T>public boolean acceptsSourceValue(Object value)
ValueConverterReturns true if the converter knows how to convert the given source value to the target type.
acceptsSourceValue in interface ValueConverter<S,T>value - the candidate source valuepublic boolean acceptsTargetValue(Object value)
ValueConverterReturns true if the converter knows how to convert the given target value to the source type.
acceptsTargetValue in interface ValueConverter<S,T>value - the candidate target valuepublic boolean acceptsTargetType(Class<?> clazz)
ValueConverterReturns true if the converter knows how to convert the given target type to the source type.
acceptsTargetType in interface ValueConverter<S,T>clazz - the candidate target typepublic T convertToTargetType(Object value)
ValueConverterConverts the given source value to the target type. This is sort of a 'serialization'.
convertToTargetType in interface ValueConverter<S,T>value - the source value to convertpublic S convertToSourceType(Object value)
ValueConverterConverts the given target value to the source type. This is sort of a 'deserialization'.
convertToSourceType in interface ValueConverter<S,T>value - the target value to convertCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.