Copy all values from fields in one class to another through reflection

If you don’t mind using a third party library, BeanUtils from Apache Commons will handle this quite easily, using copyProperties(Object, Object).

Leave a Comment