开发者

Eclipse Generate All getters setters in package

开发者 https://www.devze.com 2022-12-20 04:14 出处:网络
Is there a way to generate a开发者_Go百科ll getters and setters in an entire package in eclipse?

Is there a way to generate a开发者_Go百科ll getters and setters in an entire package in eclipse? Thanks.


Assuming you're using Java, you may want to take a look at Project Lombok.


Generating getters and setters on everything in an entire package seems like a very bad idea. Not everything should be accessible or modifiable. Good OO design includes knowing when to encapsulate by keeping some things private.

That said, you might already know this. If you're looking to do this for some academic exercise, feel free to disregard.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号