public final class InterfaceIsTypeCheck extends Check
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.
| Constructor and Description |
|---|
InterfaceIsTypeCheck() |
| Modifier and Type | Method and Description |
|---|---|
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 aFlag)
Controls whether marker interfaces like Serializable are allowed.
|
void |
visitToken(DetailAST aAST)
Called to process a token.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic int[] getRequiredTokens()
CheckgetRequiredTokens in class CheckTokenTypespublic void visitToken(DetailAST aAST)
CheckvisitToken in class CheckaAST - the token to processpublic void setAllowMarkerInterfaces(boolean aFlag)
aFlag - whether to allow marker interfaces or notCopyright © 2001-2014. All Rights Reserved.