I would like to copy the property values from Class A to Class B with BeanUtils which has same fields but with different names. Is it possible to provide a map of property name to differentName, age to differentAge etc., and achieve the copying? I am interested to know if this is possible by any means using only Apache Commons utilities (not any other tools).
class ClassA{
private String name;
private Integer age;
... // Setter and Getter methods
}
class ClassB{
private String differentName;
private Integer differentAge;
... // Setter and Getter methods for the private fields
}