You may have this situation, you need to copy an object for some purpose. So you know the copy constructor but do you know how may ways to implement it? After I read Beautiful Java: Reflection and the BeanCopier, I complied those methods.
Also you need to think about Law of Distributed Object Design: Don’t distribute your objects!

1. deep clone
2. Serializable
3. Java Reflection
4. JBossSerialization
5. Xstream
6. Apache BeanUtils

Reference:
Why Copying an Object is a terrible thing to do?

Discover the secrets of the Java Serialization API 

Advertisements