public final class NonStaticMethodCheck extends AbstractCheck
this.
If your method doesn't need this than why it is not
static?
The exception here is when method has @Override annotation. There's
no concept of inheritance and polymorphism for static methods even if they
don't need this to perform the actual work.
Another exception is when method is abstract or native.
Such methods don't have body so detection based on this doesn't
make sense for them.
AutomaticBean.OutputStreamOptions| Constructor and Description |
|---|
NonStaticMethodCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens() |
int[] |
getDefaultTokens() |
int[] |
getRequiredTokens() |
void |
setExcludeFileNamePattern(java.lang.String excl)
Exclude files matching given pattern.
|
void |
visitToken(DetailAST ast) |
beginTree, clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildpublic void setExcludeFileNamePattern(java.lang.String excl)
excl - Regexp of classes to exclude.public int[] getDefaultTokens()
getDefaultTokens in class AbstractCheckpublic int[] getAcceptableTokens()
getAcceptableTokens in class AbstractCheckpublic int[] getRequiredTokens()
getRequiredTokens in class AbstractCheckpublic void visitToken(DetailAST ast)
visitToken in class AbstractCheckCopyright © 2011–2019 Qulice.com. All rights reserved.