Copying JavaBeans Instances: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
=BeanUtils= | =BeanUtils= | ||
<tt>org.apache.commons.beanutils.BeanUtils</tt> is a utility method for populating JavaBeans properties via reflection. | <tt>org.apache.commons.beanutils.BeanUtils</tt> 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. |
Revision as of 19:41, 15 October 2018
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.