public class ConversionServiceConverterManager extends Object implements ConverterManager
Modifier and Type | Class and Description |
---|---|
static class |
ConversionServiceConverterManager.NameToStringConverter |
static class |
ConversionServiceConverterManager.StringToNameConverter |
Constructor and Description |
---|
ConversionServiceConverterManager() |
ConversionServiceConverterManager(GenericConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Class<?> fromClass,
String syntax,
Class<?> toClass)
Determine whether this converter manager is able to carry out a specified conversion.
|
<T> T |
convert(Object source,
String syntax,
Class<T> toClass)
Convert a given source object with an optional LDAP syntax to an instance of a given class.
|
public ConversionServiceConverterManager(GenericConversionService conversionService)
public ConversionServiceConverterManager()
public boolean canConvert(Class<?> fromClass, String syntax, Class<?> toClass)
ConverterManager
canConvert
in interface ConverterManager
fromClass
- Convert from the fromClass
.syntax
- Using the LDAP syntax (may be null).toClass
- To the toClass
.True
if the conversion is supported, false
otherwise.public <T> T convert(Object source, String syntax, Class<T> toClass)
ConverterManager
convert
in interface ConverterManager
T
- The class to convert to.source
- The object to convert.syntax
- The LDAP syntax to use (may be null).toClass
- The class to convert to.