public class TypecastParenPadCheck extends AbstractParenPadCheck
Checks the padding of parentheses for typecasts. That is whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden.
The policy to verify is specified using the PadOption class and
defaults to PadOption.NOSPACE.
An example of how to configure the check is:
<module name="TypecastParenPad"/>
An example of how to configure the check to require spaces for the parentheses of constructor, method, and super constructor invocations is:
<module name="TypecastParenPad">
<property name="option" value="space"/>
</module>
AutomaticBean.OutputStreamOptionsMSG_WS_FOLLOWED, MSG_WS_NOT_FOLLOWED, MSG_WS_NOT_PRECEDED, MSG_WS_PRECEDED| Constructor and Description |
|---|
TypecastParenPadCheck() |
| 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 |
visitToken(DetailAST ast)
Called to process a token.
|
processLeft, processRight, setOptionbeginTree, 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 TypecastParenPadCheck()
public int[] getRequiredTokens()
AbstractCheckgetRequiredTokens in class AbstractCheckTokenTypespublic int[] getDefaultTokens()
AbstractCheckgetDefaultTokens in class AbstractCheckTokenTypespublic int[] getAcceptableTokens()
AbstractCheckgetAcceptableTokens in class AbstractCheckTokenTypespublic void visitToken(DetailAST ast)
AbstractCheckvisitToken in class AbstractCheckast - the token to processCopyright © 2001-2017. All Rights Reserved.