Tuesday, 3 September 2013

Is there some library that does a deep copy of an object in Java?

Is there some library that does a deep copy of an object in Java?

I have complex object representing configuration of the program (comprises
other custom objects, maps, strings etc. ) mutable object that is refereed
in many places.
When reusing it I need to create a new copy of it with the same data.
Is there some Java library that will be able to create a deep copy of a type?
Ideally smth like: WeirdComplexType object; SomeAwesomeCopyMaker copyier =
new SomeAwesomeCopyMaker(); object deepCopy = copyier.createDeepCopy();

No comments:

Post a Comment