ArgumentConverterDefaultArgumentConverter@API(status=EXPERIMENTAL, since="5.0") public abstract class SimpleArgumentConverter extends java.lang.Object implements ArgumentConverter
SimpleArgumentConverter is an abstract base class for ArgumentConverter
implementations.ArgumentConverter| Constructor | Description |
|---|---|
SimpleArgumentConverter() |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract java.lang.Object |
convert(java.lang.Object source,
java.lang.Class<?> targetType) |
Convert the supplied
source object into to the supplied
targetType. |
java.lang.Object |
convert(java.lang.Object source,
ParameterContext context) |
Convert the supplied
source object according to the supplied
context. |
public final java.lang.Object convert(java.lang.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 java.lang.Object convert(java.lang.Object source,
java.lang.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.