Copying JavaBeans Instances
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. This method can be used even if we don't have access to the JavaBeans instance class code.