Interface BeanUtils.Converter
-
- Enclosing class:
- BeanUtils
public static interface BeanUtils.ConverterMarker 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 settersetFoo(FooClass foo)and the converter has a methodFooClass 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.