Is there a class member order inspection available?

I have never heard of this rule, but apparently in some companies (including mine) there is a strict rule that the fields must come before methods, etc. Is there an inspection available, which will check that the (Java) class members are in the following order:

static fields
static methods

Please, my fellow developers, let me know if you are structuring your code like this and whether it actually helps you or not :)
1 comment
Comment actions Permalink

I have found out that Idea is actually able to reorder class members, just see Code Style > Java > Arrangements. It would be nice if there would be a code inspector which would check that the arrangements rules are held for the class though.


Please sign in to leave a comment.