在Eclipse中自动创建类的构建器 [英] Automatically create builder for class in Eclipse

查看:161
本文介绍了在Eclipse中自动创建类的构建器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有自动生成器的方法(约书亚布洛赫的Builder模式)在Eclipse中创建类?例如菜单中的一个选项,插件或...我在 Refactor 中找不到任何东西。

解决方案

也许我迟到了。



Eclipse自己不提供一种生成代码来支持构建器模式的方法。然而,它可以通过插件来扩展,以增强功能。



有这个插件,我使用这个:



https://code.google.com/p/bpep/



由于上述链接将来可能会变得无效,因此我进行了搜索,并发现它可从以下网址获取: https:/ /github.com/henningjensen/bpep


Is there a way for automatic builder (Joshua Bloch's Builder Pattern) creating for classes in Eclipse? For example an option in menu, a plugin or ... .I could not find any thing in Refactor.

解决方案

Maybe I am late to the party.

Eclipse on its own does not provide a way to generate code to support builder pattern. However it can be extended through plugins to enhance the functionality.

There is this plugin that I use this:

https://code.google.com/p/bpep/

Since the above link might become invalid in the future, I did a search and also found that it is available at: https://github.com/henningjensen/bpep

这篇关于在Eclipse中自动创建类的构建器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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