public static class MultiValuesConverterFactory.MultiValuesToObjectConverter extends Object
ConvertibleMultiValues
to a POJO Object
.Constructor and Description |
---|
MultiValuesToObjectConverter(ConversionService<?> conversionService) |
Modifier and Type | Method and Description |
---|---|
protected Optional<Object> |
retrieveDeepObjectValue(ArgumentConversionContext<Object> conversionContext,
String name,
ConvertibleMultiValues<String> parameters)
Method to retrieve the values from a parameter in DEEP_OBJECT format and return in desired type.
|
protected Optional<Object> |
retrieveMultiValue(ArgumentConversionContext<Object> conversionContext,
String name,
ConvertibleMultiValues<String> parameters)
Method to retrieve the values from a parameter in MULTI format and return in desired type.
|
protected Optional<Object> |
retrieveSeparatedValue(ArgumentConversionContext<Object> conversionContext,
String name,
ConvertibleMultiValues<String> parameters,
String defaultValue,
Character delimiter)
Method to retrieve the values from a separated parameter and return the parameter in desired type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert, of
public MultiValuesToObjectConverter(ConversionService<?> conversionService)
protected Optional<Object> retrieveSeparatedValue(ArgumentConversionContext<Object> conversionContext, String name, ConvertibleMultiValues<String> parameters, String defaultValue, Character delimiter)
conversionContext
- the conversion context of the value to which conversion is done
(including type and annotations)name
- the name of the parameterparameters
- all the parameters from which the parameter of given name needs to be retrieveddefaultValue
- default valuedelimiter
- the delimiter of the values in the parameter Stringprotected Optional<Object> retrieveMultiValue(ArgumentConversionContext<Object> conversionContext, String name, ConvertibleMultiValues<String> parameters)
conversionContext
- the conversion context of the value to which conversion is done
(including type and annotations)name
- the name of the parameterparameters
- all the parameters from which the parameter of given name needs to be retrievedprotected Optional<Object> retrieveDeepObjectValue(ArgumentConversionContext<Object> conversionContext, String name, ConvertibleMultiValues<String> parameters)
conversionContext
- the conversion context of the value to which conversion is done
(including type and annotations)name
- the name of the parameterparameters
- all the parameters from which the parameter of given name needs to be retrieved