Need help with cloning?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

kostaskougios
469 Stars 94 Forks Other 171 Commits 33 Opened issues

Description

deep clone java objects

Services available

!
?

Need anything else?

Contributors list

# 252,343
Java
69 commits
# 65,614
metapro...
jvm-lan...
static-...
Shell
7 commits
# 137,293
apex
plsql
skype
xmpp-cl...
6 commits
# 520,121
Java
4 commits
# 9,037
Java
Shell
jvm-lan...
object-...
4 commits
# 643,554
Java
1 commit
# 395,829
Shell
service...
Docker
orchest...
1 commit
# 397,983
JavaScr...
jquery-...
client-...
Shell
1 commit
# 634,803
JavaFX
CSS
HTML
Shell
1 commit
# 121,147
XML
sensor
Arduino
fuzz
1 commit

Summary

The cloning library is a small, open source (Apache licensed) Java library which deep-clones objects. The objects don't have to implement the Cloneable interface. Effectively, this library can clone ANY Java object. It can be used i.e. in cache implementations if you don't want the cached object to be modified or whenever you want to create a deep copy of objects.

Here is an example of its usage:

Cloner cloner=new Cloner();

MyClass clone=cloner.deepClone(o); // clone is a deep-clone of o

IMPORTANT : deep cloning of Java classes might mean thousands of objects are cloned! Also cloning of files and streams might make the JVM crash. Enable dumping of cloned classes to stdout during development is highly recommended in order to view what is cloned.

Useful links

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.