public class DeclarationOrderCheck extends Check
Checks that the parts of a class or interface declaration appear in the order suggested by the Code Conventions for the Java Programming Language.
An example of how to configure the check is:
<module name="DeclarationOrder"/>
Constructor and Description |
---|
DeclarationOrderCheck() |
Modifier and Type | Method and Description |
---|---|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
void |
leaveToken(DetailAST ast)
Called after all the child nodes have been process.
|
void |
setIgnoreConstructors(boolean ignoreConstructors)
Sets whether to ignore constructors.
|
void |
setIgnoreMethods(boolean ignoreMethods)
Sets whether to ignore methods.
|
void |
setIgnoreModifiers(boolean ignoreModifiers)
Sets whether to ignore modifiers.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public DeclarationOrderCheck()
public int[] getDefaultTokens()
Check
getDefaultTokens
in class Check
TokenTypes
public void visitToken(DetailAST ast)
Check
visitToken
in class Check
ast
- the token to processpublic void leaveToken(DetailAST ast)
Check
leaveToken
in class Check
ast
- the token leavingpublic void setIgnoreConstructors(boolean ignoreConstructors)
ignoreConstructors
- whether to ignore constructors.public void setIgnoreMethods(boolean ignoreMethods)
ignoreMethods
- whether to ignore methods.public void setIgnoreModifiers(boolean ignoreModifiers)
ignoreModifiers
- whether to ignore modifiers.Copyright © 2001–2015. All rights reserved.