com.puppycrawl.tools.checkstyle.checks.whitespace

Class EmptyForIteratorPadCheck

public class EmptyForIteratorPadCheck extends AbstractOptionCheck

Checks the padding of an empty for iterator; that is whether a space is required at an empty for iterator, or such spaces are forbidden. No check occurs if there is a line wrap at the iterator, as in

for (Iterator foo = very.long.line.iterator();
      foo.hasNext();
     )
   

The policy to verify is specified using the {@link PadOption} class and defaults to {@link PadOption#NOSPACE}.

An example of how to configure the check is:

 <module name="EmptyForIteratorPad"/>
 

Version: 1.0

Author: Rick Giles

Constructor Summary
EmptyForIteratorPadCheck()
Sets the paren pad otion to nospace.
Method Summary
int[]getDefaultTokens()
{@inheritDoc}
voidvisitToken(DetailAST aAST)
{@inheritDoc}

Constructor Detail

EmptyForIteratorPadCheck

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

Method Detail

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc}

visitToken

public void visitToken(DetailAST aAST)
{@inheritDoc}