[java] New Rule: AccesorMethodGeneration - complements accessor class rule
A source code analyzer
Brought to you by:
adangel,
juansotuyo
The AccessorClassGeneration rule detects synthetic methods which are needed for accessing private constructors across nested class boundaries. Accessor methods are also generated when private methods or fields are accessed across nested class boundaries. I would like to see an AccessorMethodGeneration
check added which detects where these would be generated so that they can be avoided in a similar fashion to the constructor ones.
Also, complement. :facepalm:
Diff:
I'll be tackling this. I'm very interested on helping Android developers keep away from multidex / 65k method count.
This rule will be specially awesome once we implement autofixable issues.
This rule will be available with PMD 5.5.4 and later.
See PR https://github.com/pmd/pmd/pull/244