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, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public void setExcludeFileNamePattern(java.lang.String excl)
excl
- Regexp of classes to exclude.public int[] getDefaultTokens()
getDefaultTokens
in class AbstractCheck
public int[] getAcceptableTokens()
getAcceptableTokens
in class AbstractCheck
public int[] getRequiredTokens()
getRequiredTokens
in class AbstractCheck
public void visitToken(DetailAST ast)
visitToken
in class AbstractCheck
Copyright © 2011–2019 Qulice.com. All rights reserved.