开发者

Eclipse + JAVA: Checking which data members can be made final

开发者 https://www.devze.com 2023-02-16 23:26 出处:网络
Is there a way in Eclipse to get a list of class data members that are not declared as final but can be declared 开发者_JAVA技巧as such?There is a configurable \"clean up\" function, that will do all

Is there a way in Eclipse to get a list of class data members that are not declared as final but can be declared 开发者_JAVA技巧as such?


There is a configurable "clean up" function, that will do all the work for you


You could use the checkstyle plugin for Eclipse for this.

http://eclipse-cs.sourceforge.net/screen_shots.html


You can use the Findbugs eclipse plugin which will give you a report with all the obvious issues in your code. It also includes a list of variables which can be marked as final.

If you want you can modify findbugs to just display this as part of your report.

Findbugs site

Findbugs eclipse plugin

0

精彩评论

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

关注公众号