AbstractConverter
Abstract implementation of the Converter interface that also supports the Populator interface.
Implementations of this base type can either be used as a converter or as a populator. When used as a
converter the AbstractConverter.createTarget() method is called to create the target instance and then the
AbstractConverter.populate(Object, Object) method is called to populate the target with values from the source
instance. The AbstractConverter.createTarget() method can be implemented via a spring lookup-method
rather than being overridden in code.@Deprecated public abstract class AbstractConverter<SOURCE,TARGET> extends AbstractConverter<SOURCE,TARGET>
| Constructor and Description |
|---|
AbstractConverter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Deprecated.
|
TARGET |
convert(SOURCE source)
Deprecated.
Converts the source object, creating a new instance of the destination type
|
protected TARGET |
createFromClass()
Deprecated.
|
void |
setBeanName(java.lang.String name)
Deprecated.
|
void |
setTargetClass(java.lang.Class<TARGET> targetClass)
Deprecated.
Allows to specify the target object class directly.
|
convert, createTarget, getMyBeanName, populateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertAll, convertAllIgnoreExceptions, getLoggerpublic TARGET convert(SOURCE source) throws ConversionException
Converterconvert in interface Converter<SOURCE,TARGET>convert in class AbstractConverter<SOURCE,TARGET>source - the source objectConversionException - if an error occurspublic void setTargetClass(java.lang.Class<TARGET> targetClass)
setTargetClass in class AbstractConverter<SOURCE,TARGET>protected TARGET createFromClass()
createFromClass in class AbstractConverter<SOURCE,TARGET>public void setBeanName(java.lang.String name)
setBeanName in class AbstractConverter<SOURCE,TARGET>public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in class AbstractConverter<SOURCE,TARGET>java.lang.ExceptionCopyright © 2017 SAP SE. All Rights Reserved.