@API(status=EXPERIMENTAL, since="5.0") public abstract class SimpleArgumentConverter extends Object implements ArgumentConverter
SimpleArgumentConverter is an abstract base class for ArgumentConverter
implementations.ArgumentConverter| Constructor and Description |
|---|
SimpleArgumentConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
convert(Object source,
Class<?> targetType)
Convert the supplied
source object into to the supplied
targetType. |
Object |
convert(Object source,
ParameterContext context)
Convert the supplied
source object according to the supplied
context. |
public final Object convert(Object source, ParameterContext context) throws ArgumentConversionException
ArgumentConvertersource object according to the supplied
context.convert in interface ArgumentConvertersource - the source object to convert; may be nullcontext - the parameter context where the converted object will be
used; never nullnull but only if the target
type is a reference typeArgumentConversionException - if an error occurs during the
conversionprotected abstract Object convert(Object source, Class<?> targetType) throws ArgumentConversionException
source object into to the supplied
targetType.source - the source object to convert; may be nulltargetType - the target type the source object should be converted
into; never nullnull but only if the target
type is a reference type.ArgumentConversionException - in case an error occurs during the
conversion.