Search code examples
javaeclipsecloneeclipse-3.5cloneable

Java's "clone()" method generator for Eclipse Galileo


What is the best tool for java's clone() method generation in Eclipse Galileo available from repositories? What is the reason, that prevents Eclipse developers from including this tool in standard release?


Solution

  • It's very hard to implement clone() right. It is considered not a good practice to do so. Bloch (Effective Java) suggest that using clone() should be avoided. Use other means of shallow cloning, like copy-constructors or utilities like commons-beanutils.