Java的“clone()” Eclipse Galileo的方法生成器 [英] Java's "clone()" method generator for Eclipse Galileo

查看:153
本文介绍了Java的“clone()” Eclipse Galileo的方法生成器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在存储库中可以使用Eclipse Galileo中的java的 clone()方法生成的最佳工具是什么?
原因是什么,阻止Eclipse开发人员将此工具纳入标准版本?

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?

推荐答案

很难执行 clone()对。这样做是不正确的做法。 Bloch(Effective Java)建议避免使用 clone()。使用其他手段的浅克隆,如复制构造函数或实用程序,如commons-beanutils。

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.

这篇关于Java的“clone()” Eclipse Galileo的方法生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆