Eclipse + JAVA: Checking which data members can be made final
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
精彩评论