Class ConversionServiceParameterValueMapper
java.lang.Object
org.springframework.boot.actuate.endpoint.invoke.convert.ConversionServiceParameterValueMapper
- All Implemented Interfaces:
ParameterValueMapper
ParameterValueMapper
backed by a ConversionService
.- Since:
- 2.0.0
- Author:
- Stephane Nicoll, Phillip Webb
-
Field Summary
Fields inherited from interface org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper
NONE
-
Constructor Summary
ConstructorDescriptionCreate a newConversionServiceParameterValueMapper
instance.ConversionServiceParameterValueMapper
(ConversionService conversionService) Create a newConversionServiceParameterValueMapper
instance backed by a specific conversion service. -
Method Summary
Modifier and TypeMethodDescriptionmapParameterValue
(OperationParameter parameter, Object value) Map the specifiedinput
parameter to the givenparameterType
.
-
Constructor Details
-
ConversionServiceParameterValueMapper
public ConversionServiceParameterValueMapper()Create a newConversionServiceParameterValueMapper
instance. -
ConversionServiceParameterValueMapper
Create a newConversionServiceParameterValueMapper
instance backed by a specific conversion service.- Parameters:
conversionService
- the conversion service
-
-
Method Details
-
mapParameterValue
public Object mapParameterValue(OperationParameter parameter, Object value) throws ParameterMappingException Description copied from interface:ParameterValueMapper
Map the specifiedinput
parameter to the givenparameterType
.- Specified by:
mapParameterValue
in interfaceParameterValueMapper
- Parameters:
parameter
- the parameter to mapvalue
- a parameter value- Returns:
- a value suitable for that parameter
- Throws:
ParameterMappingException
- when a mapping failure occurs
-