com.puppycrawl.tools.checkstyle.checks.whitespace

Class WhitespaceAfterCheck

Implemented Interfaces:
Configurable, Contextualizable

public class WhitespaceAfterCheck
extends Check

Checks that a token is followed by whitespace, with the exception that it does not check for whitespace after the semicolon of an empty for iterator. Use Check EmptyForIteratorPad to validate empty for iterators.

By default the check will check the following tokens: COMMA, SEMI, TYPECAST.

An example of how to configure the check is:

 <module name="WhitespaceAfter"/>
 

An example of how to configure the check for whitespace only after COMMA and SEMI tokens is:

 <module name="WhitespaceAfter">
     <property name="tokens" value="COMMA, SEMI"/>
 </module>
 
Version:
1.0
Authors:
Oliver Burn
Rick Giles

Method Summary

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

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

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity

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

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

getDefaultTokens

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

visitToken

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