Class AbstractParenPadCheck
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.AbstractCheck
com.puppycrawl.tools.checkstyle.checks.whitespace.AbstractParenPadCheck
- All Implemented Interfaces:
Configurable
,Contextualizable
- Direct Known Subclasses:
ParenPadCheck
,TypecastParenPadCheck
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
AutomaticBean.OutputStreamOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
processLeft
(DetailAST ast) Process a token representing a left parentheses.protected void
processRight
(DetailAST ast) Process a token representing a right parentheses.void
Set the option to enforce.Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
beginTree, clearMessages, destroy, finishTree, getAcceptableTokens, getDefaultTokens, getFileContents, getLine, getLines, getMessages, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setFileContents, setTabWidth, setTokens, visitToken
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, getConfiguration, setupChild
-
Field Details
-
MSG_WS_FOLLOWED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_WS_NOT_FOLLOWED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_WS_PRECEDED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_WS_NOT_PRECEDED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
-
Constructor Details
-
AbstractParenPadCheck
public AbstractParenPadCheck()
-
-
Method Details
-
setOption
Set the option to enforce.- Parameters:
optionStr
- string to decode option from- Throws:
IllegalArgumentException
- if unable to decode
-
processLeft
Process a token representing a left parentheses.- Parameters:
ast
- the token representing a left parentheses
-
processRight
Process a token representing a right parentheses.- Parameters:
ast
- the token representing a right parentheses
-