| Constructor and Description |
|---|
BinderConversionService(org.springframework.core.convert.ConversionService conversionService)
Create a new
BinderConversionService instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Class<?> sourceType,
Class<?> targetType) |
boolean |
canConvert(Object source,
org.springframework.core.ResolvableType targetType)
Return
true if the given source object can be converted to the
targetType. |
boolean |
canConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
<T> T |
convert(Object value,
Bindable<T> bindable) |
<T> T |
convert(Object source,
Class<T> targetType) |
<T> T |
convert(Object value,
org.springframework.core.ResolvableType type) |
Object |
convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
public BinderConversionService(org.springframework.core.convert.ConversionService conversionService)
BinderConversionService instance.conversionService - and option root conversion servicepublic boolean canConvert(Object source, org.springframework.core.ResolvableType targetType)
true if the given source object can be converted to the
targetType.source - the source objecttargetType - the target type to convert to (required)true if a conversion can be performed, false if notIllegalArgumentException - if targetType is nullpublic boolean canConvert(Class<?> sourceType, Class<?> targetType)
canConvert in interface org.springframework.core.convert.ConversionServicepublic boolean canConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
canConvert in interface org.springframework.core.convert.ConversionServicepublic <T> T convert(Object value, org.springframework.core.ResolvableType type)
public <T> T convert(Object source, Class<T> targetType)
convert in interface org.springframework.core.convert.ConversionServiceCopyright © 2017 Pivotal Software, Inc.. All rights reserved.