public abstract class AbstractParenPadCheck extends AbstractCheck
Abstract class for checking the padding of parentheses. That is whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden.
AutomaticBean.OutputStreamOptions
Modifier and Type | Field and Description |
---|---|
static String |
MSG_WS_FOLLOWED
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_WS_NOT_FOLLOWED
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_WS_NOT_PRECEDED
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_WS_PRECEDED
A key is pointing to the warning message text in "messages.properties"
file.
|
Constructor and Description |
---|
AbstractParenPadCheck() |
Modifier and Type | Method and Description |
---|---|
protected void |
processLeft(DetailAST ast)
Process a token representing a left parentheses.
|
protected void |
processRight(DetailAST ast)
Process a token representing a right parentheses.
|
void |
setOption(String optionStr)
Set the option to enforce.
|
beginTree, clearMessages, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getMessages, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens, visitToken
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public static final String MSG_WS_FOLLOWED
public static final String MSG_WS_NOT_FOLLOWED
public static final String MSG_WS_PRECEDED
public static final String MSG_WS_NOT_PRECEDED
public AbstractParenPadCheck()
public void setOption(String optionStr)
optionStr
- string to decode option fromIllegalArgumentException
- if unable to decodeprotected void processLeft(DetailAST ast)
ast
- the token representing a left parenthesesprotected void processRight(DetailAST ast)
ast
- the token representing a right parenthesesCopyright © 2001–2018. All rights reserved.