Interface BeanUtils.Converter
- Enclosing class:
BeanUtils
public static interface BeanUtils.Converter
Marker interface for converter classes. The real method are determined via reflection. A converter needs to match both the source and the
destination bean. If the destination bean has a setter
setFoo(FooClass foo) and the converter has a method
FooClass convertToFoo(SourceBeanClass sourceBean), then this will be called instead of any getter of the sourceBean.
Note:
- The declared
SourceBeanClassin the converter method can also be a superclass ofsourceBeanor an interface implemented bysourceBean - If there is a matching method
convertToFoo(), it needs to have an appropriate return type or else anIllegalArgumentExceptionwill be thrown.