public abstract class Converter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Converters |
converters |
| Constructor and Description |
|---|
Converter(Converters converters)
Build a new Converter instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Object value,
Type targetType)
Tells if the supplied object may be converted to the supplied target type by
this converter.
|
Object |
convert(Object value,
Type targetType)
Converts the supplied object to the supplied target type.
|
protected abstract boolean |
internalCanConvert(Object value,
Type targetType) |
protected abstract Object |
internalConvert(Object value,
Type targetType) |
protected final Converters converters
public Converter(Converters converters)
converters - a Converters instance (must be not null).NullPointerException - (if converters is null).public final boolean canConvert(Object value, Type targetType)
value - the object to be converted.targetType - the target type.protected abstract boolean internalCanConvert(Object value, Type targetType)
public final Object convert(Object value, Type targetType)
value - the object to be converted.targetType - the target type.protected abstract Object internalConvert(Object value, Type targetType)