|
Spring LDAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.ldap.odm.typeconversion.impl.ConverterManagerImpl
public final class ConverterManagerImpl
An implementation of ConverterManager.
The algorithm used is to:
Converter registered for the
fromClass, syntax and toClass and use it.toClass isAssignableFrom
the fromClass then just assign it.Converter registered for the fromClass and
the toClass ignoring the syntax.ConverterException.
| Constructor Summary | |
|---|---|
ConverterManagerImpl()
Create an empty ConverterManagerImpl |
|
| Method Summary | ||
|---|---|---|
void |
addConverter(Class<?> fromClass,
String syntax,
Class<?> toClass,
Converter converter)
Add a Converter to this ConverterManager. |
|
boolean |
canConvert(Class<?> fromClass,
String syntax,
Class<?> toClass)
Determine whether this converter manager is able to carry out a specified conversion. |
|
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConverterManagerImpl()
| Method Detail |
|---|
public boolean canConvert(Class<?> fromClass,
String syntax,
Class<?> toClass)
ConverterManager
canConvert in interface ConverterManagerfromClass - 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 ConverterManagerT - 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.
public void addConverter(Class<?> fromClass,
String syntax,
Class<?> toClass,
Converter converter)
Converter to this ConverterManager.
fromClass - The class the Converter should be used to convert from.syntax - The LDAP syntax that the Converter should be used for.toClass - The class the Converter should be used to convert to.converter - The Converter to add.
|
Spring LDAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||