T - The class from which to convertpublic abstract static class MultiValuesConverterFactory.AbstractConverterToMultiValues<T> extends java.lang.Object implements FormattingTypeConverter<T,ConvertibleMultiValues,Format>
| Modifier and Type | Field and Description |
|---|---|
protected ConversionService<?> |
conversionService |
| Constructor and Description |
|---|
AbstractConverterToMultiValues(ConversionService<?> conversionService) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addDeepObjectValues(ArgumentConversionContext<java.lang.Object> context,
java.lang.String name,
T object,
MutableConvertibleMultiValuesMap<java.lang.String> parameters)
Method that adds given value to the parameters in A DEEP_OBJECT format.
|
protected abstract void |
addMutliValues(ArgumentConversionContext<java.lang.Object> context,
java.lang.String name,
T object,
MutableConvertibleMultiValuesMap<java.lang.String> parameters)
Method that adds given value to the parameters in a MULTI format.
|
protected abstract void |
addSeparatedValues(ArgumentConversionContext<java.lang.Object> context,
java.lang.String name,
T object,
MutableConvertibleMultiValuesMap<java.lang.String> parameters,
java.lang.Character delimiter)
Method that adds given value to the parameters in a format separated by a delimiter.
|
java.lang.Class<Format> |
annotationType() |
java.util.Optional<ConvertibleMultiValues> |
convert(T object,
java.lang.Class<ConvertibleMultiValues> targetType,
ConversionContext conversionContext)
Converts from the given source object type to the target type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvert, ofprotected ConversionService<?> conversionService
public AbstractConverterToMultiValues(ConversionService<?> conversionService)
public java.util.Optional<ConvertibleMultiValues> convert(T object, java.lang.Class<ConvertibleMultiValues> targetType, ConversionContext conversionContext)
TypeConverterOptional.empty()
in case the object is not convertible by catching any necessary exceptions and failing gracefully.convert in interface TypeConverter<T,ConvertibleMultiValues>object - The object typetargetType - The target type being converted toconversionContext - The ConversionContextprotected abstract void addSeparatedValues(ArgumentConversionContext<java.lang.Object> context, java.lang.String name, T object, MutableConvertibleMultiValuesMap<java.lang.String> parameters, java.lang.Character delimiter)
context - - the context of conversion which has the source type and any present annotationsname - - the name of the parameterobject - - the object that we are converting fromparameters - - the parameters to the value of additional parameter will be addeddelimiter - - the required delimiter of the values in the parameter Stringprotected abstract void addMutliValues(ArgumentConversionContext<java.lang.Object> context, java.lang.String name, T object, MutableConvertibleMultiValuesMap<java.lang.String> parameters)
context - - the context of conversion which has the source type and any present annotationsname - - the name of the parameterobject - - the object that we are converting fromparameters - - the parameters to the value of additional parameter will be addedprotected abstract void addDeepObjectValues(ArgumentConversionContext<java.lang.Object> context, java.lang.String name, T object, MutableConvertibleMultiValuesMap<java.lang.String> parameters)
context - - the context of conversion which has the source type and any present annotationsname - - the name of the parameterobject - - the object that we are converting fromparameters - - the parameters to the value of additional parameter will be addedpublic java.lang.Class<Format> annotationType()
annotationType in interface FormattingTypeConverter<T,ConvertibleMultiValues,Format>