Disallow some set of modifiers for specified Java types.
Example: it hard to imagine common problems for such cases but in our case is a
static for ULCComponents is not allowed(http://ulc-community.canoo.com/snipsnap/space/Good+Practices) .
Only 4 types according to Java Spec: static, final, transient, volatile.
So we could have settings like this:
Static - "ULC*"
Final - ""
Transient - ""
Volatile - ""
We detect variable/field declaration, detect modifier, check modifier's RegExp against Java Type, if match - fire error.
Log in to post a comment.