org.springframework.ldap.odm.typeconversion.impl
Interface Converter
- All Known Implementing Classes:
- FromStringConverter, ToStringConverter
public interface Converter
Interface specifying the conversion between two classes
- Author:
- Paul Harvey <paul.at.pauls-place.me.uk>
Method Summary |
|
convert(Object source,
Class<T> toClass)
Attempt to convert a given object to a named class. |
convert
<T> T convert(Object source,
Class<T> toClass)
throws Exception
- Attempt to convert a given object to a named class.
- Type Parameters:
T
- The class to convert to.- Parameters:
source
- The object to convert.toClass
- The class to convert to.
- Returns:
- The converted class or null if the conversion was not possible.
- Throws:
Exception
- Any exception may be throw by a Converter on error.