public class DelegatingConversionService
extends java.lang.Object
implements org.springframework.core.convert.ConversionService
ConversionService implementation delegates the actual conversion the ConversionService if finds in its
internal List that claims to be able to convert a given class. It will roll through the internal Stack
of ConversionServices until it finds one that can convert the given type.| Constructor and Description |
|---|
DelegatingConversionService() |
DelegatingConversionService(org.springframework.core.convert.ConversionService... svcs) |
| Modifier and Type | Method and Description |
|---|---|
DelegatingConversionService |
addConversionService(int atIndex,
org.springframework.core.convert.ConversionService svc)
Add a
ConversionService to the internal list at a specific index for controlling the priority. |
DelegatingConversionService |
addConversionServices(org.springframework.core.convert.ConversionService... svcs)
Add
ConversionServices to the internal list of those to delegate to. |
boolean |
canConvert(java.lang.Class<?> from,
java.lang.Class<?> to) |
boolean |
canConvert(org.springframework.core.convert.TypeDescriptor from,
org.springframework.core.convert.TypeDescriptor to) |
<T> T |
convert(java.lang.Object o,
java.lang.Class<T> type) |
java.lang.Object |
convert(java.lang.Object o,
org.springframework.core.convert.TypeDescriptor from,
org.springframework.core.convert.TypeDescriptor to) |
public DelegatingConversionService()
public DelegatingConversionService(org.springframework.core.convert.ConversionService... svcs)
public DelegatingConversionService addConversionServices(org.springframework.core.convert.ConversionService... svcs)
ConversionServices to the internal list of those to delegate to.svcs - The ConversionServices to delegate to (in order).public DelegatingConversionService addConversionService(int atIndex, org.springframework.core.convert.ConversionService svc)
ConversionService to the internal list at a specific index for controlling the priority.atIndex - Where in the stack to add this ConversionService.svc - The ConversionService to add.public boolean canConvert(java.lang.Class<?> from,
java.lang.Class<?> to)
canConvert in interface org.springframework.core.convert.ConversionServicepublic boolean canConvert(org.springframework.core.convert.TypeDescriptor from,
org.springframework.core.convert.TypeDescriptor to)
canConvert in interface org.springframework.core.convert.ConversionServicepublic <T> T convert(java.lang.Object o,
java.lang.Class<T> type)
convert in interface org.springframework.core.convert.ConversionServicepublic java.lang.Object convert(java.lang.Object o,
org.springframework.core.convert.TypeDescriptor from,
org.springframework.core.convert.TypeDescriptor to)
convert in interface org.springframework.core.convert.ConversionService