public final class InterfaceIsTypeCheck extends AbstractCheck
An interface should describe a type, it is therefore inappropriate to define an interface that does not contain any methods but only constants.
The check can be configured to also disallow marker interfaces like
java.io.Serializable, that do not contain methods or
constants at all.
AutomaticBean.OutputStreamOptions| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_KEY
A key is pointing to the warning message text in "messages.properties"
file.
|
| Constructor and Description |
|---|
InterfaceIsTypeCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
setAllowMarkerInterfaces(boolean flag)
Controls whether marker interfaces like Serializable are allowed.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
beginTree, clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic static final String MSG_KEY
public InterfaceIsTypeCheck()
public int[] getDefaultTokens()
AbstractCheckgetDefaultTokens in class AbstractCheckTokenTypespublic int[] getRequiredTokens()
AbstractCheckgetRequiredTokens in class AbstractCheckTokenTypespublic int[] getAcceptableTokens()
AbstractCheckgetAcceptableTokens in class AbstractCheckTokenTypespublic void visitToken(DetailAST ast)
AbstractCheckvisitToken in class AbstractCheckast - the token to processpublic void setAllowMarkerInterfaces(boolean flag)
flag - whether to allow marker interfaces or notCopyright © 2001-2017. All Rights Reserved.