Java Code Style
Posted on 2013-06-12
We have a legacy Java code( Code written over 10 years ago). Legacy Code followed distinct coding styles. Example of one being that Instance variables were declared at the bottom of the class.
A new team took over the legacy code and started changes( adding spring framework and other changes). After few months, we realized that team was declaring instance variables at the top of the class. Decision was made to keep the instance variables at the bottom(old style).
My question :
1. Is it possible using some tool/plug or some code formatting file in to find out number of classes affected by the change in coding style?
2. If #1 is possible, and I manage to identify the classes, what would be the easiest way to change the declaration of all instance variables to be at the bottom of the class rather than at the top.
Can I configure a code formatting file or checkstyle or PMD or some other tool to achieve above objectives?