public class ConversionServiceParameterMapper extends Object implements ParameterMapper
ParameterMapper
that uses a ConversionService
to map parameter values
if necessary.Constructor and Description |
---|
ConversionServiceParameterMapper() |
ConversionServiceParameterMapper(org.springframework.core.convert.ConversionService conversionService)
Create a new instance with the
ConversionService to use. |
Modifier and Type | Method and Description |
---|---|
<T> T |
mapParameter(Object input,
Class<T> parameterType)
Map the specified
input parameter to the given parameterType . |
public ConversionServiceParameterMapper()
public ConversionServiceParameterMapper(org.springframework.core.convert.ConversionService conversionService)
ConversionService
to use.conversionService
- the conversion servicepublic <T> T mapParameter(Object input, Class<T> parameterType)
ParameterMapper
input
parameter to the given parameterType
.mapParameter
in interface ParameterMapper
T
- the actual type of the parameterinput
- a parameter valueparameterType
- the required type of the parameterCopyright © 2017 Pivotal Software, Inc.. All rights reserved.