com.puppycrawl.tools.checkstyle.checks.modifier
Class ModifierOrderCheck
- Configurable, Contextualizable
public class ModifierOrderCheck
Checks that the order of modifiers conforms to the suggestions in the
Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3.
The correct order is:
- public
- protected
- private
- abstract
- static
- final
- transient
- volatile
- synchronized
- native
- strictfp
In additional, modifiers are checked to ensure all annotations
are declared before all other modifiers.
Rationale: Code is easier to read if everybody follows
a standard.
An example of how to configure the check is:
<module name="ModifierOrder"/>
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken |
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity |