Add code to clone objeccts in java/mcache.