com.puppycrawl.tools.checkstyle.checks.whitespace

Class EmptyForInitializerPadCheck

Implemented Interfaces:
Configurable, Contextualizable

public class EmptyForInitializerPadCheck
extends AbstractOptionCheck

Checks the padding of an empty for initializer; that is whether a space is required at an empty for initializer, or such spaces are forbidden. No check occurs if there is a line wrap at the initializer, as in
for (
; i < j; i++, j--)

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="EmptyForInitializerPad"/>
 

Version:
1.0

Author:
lkuehne

Constructor Summary

EmptyForInitializerPadCheck()
Sets the paren pad otion to nospace.

Method Summary

int[]
getDefaultTokens()
void
visitToken(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck

getAbstractOption, setOption

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Constructor Details

EmptyForInitializerPadCheck

public EmptyForInitializerPadCheck()
Sets the paren pad otion to nospace.

Method Details

getDefaultTokens

public int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check

See Also:
Check


visitToken

public void visitToken(DetailAST aAST)
Overrides:
visitToken in interface Check

See Also:
Check