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
507 Stars 97 Forks Other 194 Commits 34 Opened issues

Description

deep clone java objects

Services available

!
?

Need anything else?

Contributors list

# 254,123
Java
80 commits
# 138,598
apex
plsql
skype
xmpp-cl...
8 commits
# 69,455
metapro...
jvm-lan...
static-...
Groovy
7 commits
# 529,332
Java
4 commits
# 9,492
Java
Shell
jvm-lan...
object-...
4 commits
# 643,483
Java
1 commit
# 346,458
Shell
PHP
Docker
TeX
1 commit
# 407,386
jquery-...
client-...
Shell
HTML
1 commit
# 634,634
JavaFX
CSS
HTML
1 commit
# 119,934
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.