Copying JavaBeans Instances

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

This article describes methods of copying Java Bean instances in such a way that changing the copy leaves the original object intact.

Object.clone()

This method can be used when we have access to the JavaBeans instance class code.

BeanUtils

org.apache.commons.beanutils.BeanUtils is a utility method for populating JavaBeans properties via reflection.