<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- Content Stylesheet for Site --> <!-- start the processing --> <!-- ====================================================================== --> <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! --> <!-- Main Page Section --> <!-- ====================================================================== --> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> <meta name="author" content="Checkstyle Development Team"> <meta name="email" content="$au.getAttributeValue("email")"> <title>Checkstyle - Whitespace</title> <style type="text/css" media="all"> @import url("./css/cs-layout.css"); @import url("./css/cs-style.css"); </style> </head> <body> <div class="csTopBar"> <div class="csTopBarContents"> <div class="csLeft"> <h1>Whitespace</h1> </div> <div class="csRight"> <a href="http://checkstyle.sourceforge.net/"> <img src="images/logo.png" alt="Checkstyle Logo" height="70"/> </a> </div> </div> </div> <div class="csMiddleContainer"> <div class="csLeftBar"> <div class="csLeftBarContents"> <!-- ============================================================ --> <!-- start makeNavigationBar --> <ul> <li> <strong>About</strong> </li> <li> <a href="./index.html">Checkstyle</a> </li> <li> <strong>Documentation</strong> </li> <li> <a href="./releasenotes.html">Release Notes</a> </li> <li> <a href="./config.html">Configuration</a> </li> <li> <a href="./property_types.html"> Property Types</a> </li> <li> <a href="./running.html">Running</a> </li> <li> <a href="./anttask.html"> Ant Task</a> </li> <li> <a href="./cmdline.html"> Command Line</a> </li> <li> <a href="./availablechecks.html">Available Checks</a> </li> <li> <a href="./checks.html">Standard Checks</a> </li> <li> <a href="./config_javadoc.html"> Javadoc Comments</a> </li> <li> <a href="./config_naming.html"> Naming Conventions</a> </li> <li> <a href="./config_header.html"> Headers</a> </li> <li> <a href="./config_imports.html"> Imports</a> </li> <li> <a href="./config_sizes.html"> Size Violations</a> </li> <li><b> <a href="./config_whitespace.html"> Whitespace</a> </b></li> <li><a href="#EmptyForInitializerPad"> EmptyForInitializerPad</a></li> <li><a href="#EmptyForIteratorPad"> EmptyForIteratorPad</a></li> <li><a href="#MethodParamPad"> MethodParamPad</a></li> <li><a href="#NoWhitespaceAfter"> NoWhitespaceAfter</a></li> <li><a href="#NoWhitespaceBefore"> NoWhitespaceBefore</a></li> <li><a href="#OperatorWrap"> OperatorWrap</a></li> <li><a href="#ParenPad"> ParenPad</a></li> <li><a href="#TypecastParenPad"> TypecastParenPad</a></li> <li><a href="#TabCharacter"> TabCharacter</a></li> <li><a href="#WhitespaceAfter"> WhitespaceAfter</a></li> <li><a href="#WhitespaceAround"> WhitespaceAround</a></li> <li> <a href="./config_modifier.html"> Modifiers</a> </li> <li> <a href="./config_blocks.html"> Block Checks</a> </li> <li> <a href="./config_coding.html"> Coding</a> </li> <li> <a href="./config_design.html"> Class Design</a> </li> <li> <a href="./config_duplicates.html"> Duplicate Code</a> </li> <li> <a href="./config_metrics.html"> Metrics</a> </li> <li> <a href="./config_misc.html"> Miscellaneous</a> </li> <li> <a href="./optional.html">Optional Checks</a> </li> <li> <a href="./config_j2ee.html"> J2EE Checks</a> </li> <li> <a href="./extending.html">Extending Checkstyle</a> </li> <li> <a href="./writingchecks.html"> Writing checks</a> </li> <li> <a href="./writingfilters.html"> Writing filters</a> </li> <li> <a href="./writinglisteners.html"> Writing listeners</a> </li> <li> <a href="./api/index.html">Javadoc</a> </li> <li> <strong>SourceForge</strong> </li> <li> <a href="http://sourceforge.net/mail/?group_id=29721">Mailing Lists</a> </li> <li> <a href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse">Bug Database</a> </li> <li> <a href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse">Feature Requests</a> </li> <li> <strong>Developers</strong> </li> <li> <a href="http://sourceforge.net/projects/checkstyle">Project Page</a> </li> <li> <a href="http://checkstyle.svn.sourceforge.net/viewvc/checkstyle/">SVN Repository</a> </li> <li> <a href="./contributing.html">Contributing</a> </li> </ul> <ul> <li> <strong>Hosted by:</strong> <div align="center"> <p><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=29721&type=1" width="88" height="31" alt="SourceForge Logo"/></a> </p> </div> </li> </ul> <!-- end makeNavigationBar --> <!-- ============================================================ --> </div> </div> <div class="csMain"> <a id="EmptyForInitializerPad"></a> <h2>EmptyForInitializerPad</h2> <h3>Description</h3> <p> Checks the padding of an empty for initializer; that is whether white space is required at an empty for initializer, or such white space is forbidden. No check occurs if there is a line wrap at the initializer, as in </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre>for ( ; i < j; i++, j--)</pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > option </td> <td class="odd" > policy on how to pad an empty for iterator </td> <td class="odd" > </td> <td class="odd" > </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="EmptyForInitializerPad"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to require white space at an empty for iterator: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="EmptyForInitializerPad"> <property name="option" value="space"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="EmptyForIteratorPad"></a> <h2>EmptyForIteratorPad</h2> <h3>Description</h3> <p> Checks the padding of an empty for iterator; that is whether white space is required at an empty for iterator, or such white space is forbidden. No check occurs if there is a line wrap at the iterator, as in </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre>for (Iterator foo = very.long.line.iterator(); foo.hasNext(); )</pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > option </td> <td class="odd" > policy on how to pad an empty for iterator </td> <td class="odd" > </td> <td class="odd" > </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="EmptyForIteratorPad"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to require white space at an empty for iterator: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="EmptyForIteratorPad"> <property name="option" value="space"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="MethodParamPad"></a> <h2>MethodParamPad</h2> <h3>Description</h3> <p> Checks the padding between the identifier of a method definition, constructor definition, method call, or constructor invocation; and the left parenthesis of the parameter list. That is, if the identifier and left parenthesis are on the same line, checks whether a space is required immediately after the identifier or such a space is forbidden. If they are not on the same line, reports an error, unless configured to allow line breaks. To allow linebreaks after the identifier, set property <span class="code">allowLineBreaks</span> to <span class="code"> true</span>. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > allowLineBreaks </td> <td class="odd" > whether a line break between the identifier and left parenthesis is allowed </td> <td class="odd" > </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NEW">LITERAL_NEW</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NEW">LITERAL_NEW</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="MethodParamPad"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to require a space after the identifier of a method definition, except if the left parenthesis occurs on a new line: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="MethodParamPad"> <property name="tokens" value="METHOD_DEF"/> <property name="option" value="space"/> <property name="allowLineBreaks" value="true"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="NoWhitespaceAfter"></a> <h2>NoWhitespaceAfter</h2> <h3>Description</h3> <p> Checks that there is no whitespace after a token. More specifically, it checks that it is not followed by whitespace, or (if linebreaks are allowed) all characters on the line after are whitespace. To forbid linebreaks after a token, set property <span class="code">allowLineBreaks</span> to <span class="code"> false</span>. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > allowLineBreaks </td> <td class="odd" > whether whitespace is allowed if the token is at a linebreak </td> <td class="odd" > </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_INIT">ARRAY_INIT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BNOT">BNOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DEC">DEC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INC">INC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LNOT">LNOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_MINUS">UNARY_MINUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_PLUS">UNARY_PLUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_INIT">ARRAY_INIT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BNOT">BNOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DEC">DEC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INC">INC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LNOT">LNOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_MINUS">UNARY_MINUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_PLUS">UNARY_PLUS</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="NoWhitespaceAfter"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to forbid linebreaks after a DOT token: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="NoWhitespaceAfter"> <property name="tokens" value="DOT"/> <property name="allowLineBreaks" value="false"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="NoWhitespaceBefore"></a> <h2>NoWhitespaceBefore</h2> <h3>Description</h3> <p> Checks that there is no whitespace before a token. More specifically, it checks that it is not preceded with whitespace, or (if linebreaks are allowed) all characters on the line before are whitespace. To allow linebreaks before a token, set property <span class="code">allowLineBreaks</span> to <span class="code"> true</span>. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > allowLineBreaks </td> <td class="odd" > whether whitespace is allowed if the token is at a linebreak </td> <td class="odd" > </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_DEC">POST_DEC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_INC">POST_INC</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_DEC">POST_DEC</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_INC">POST_INC</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="NoWhitespaceBefore"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to allow linebreaks before a DOT token: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="NoWhitespaceBefore"> <property name="tokens" value="DOT"/> <property name="allowLineBreaks" value="true"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="OperatorWrap"></a> <h2>OperatorWrap</h2> <h3>Description</h3> <p> Checks the policy on how to wrap lines on operators. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > option </td> <td class="odd" > policy on how to wrap lines </td> <td class="odd" > <a href="property_types.html#wrapOp">wrap operator policy</a> </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_INSTANCEOF">LITERAL_INSTANCEOF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">MINUS_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">MOD_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">PLUS_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">SL_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">SR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">STAR_ASSIGN</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_INSTANCEOF">LITERAL_INSTANCEOF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a> (all tokens except assignment operators) </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="OperatorWrap"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check for the assignment operator, <span class="code">=</span>, at the end of a line: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="OperatorWrap"> <property name="tokens" value="ASSIGN"/> <property name="option" value="eol"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="ParenPad"></a> <h2>ParenPad</h2> <h3>Description</h3> <p> Checks the policy on the padding of parentheses; i.e. whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > option </td> <td class="odd" > policy on how to pad parentheses </td> <td class="odd" > </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_CALL">CTOR_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LPAREN">LPAREN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_CALL">CTOR_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LPAREN">LPAREN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="ParenPad"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to require spaces for the parentheses of constructor, method, and super constructor calls: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="ParenPad"> <property name="tokens" value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"/> <property name="option" value="space"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="TypecastParenPad"></a> <h2>TypecastParenPad</h2> <h3>Description</h3> <p> Checks the policy on the padding of parentheses for typecasts. That is, whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > option </td> <td class="odd" > policy on how to pad parentheses </td> <td class="odd" > </td> <td class="odd" > </td> </tr> <tr class="even"> <td class="even" > tokens </td> <td class="even" > tokens to check </td> <td class="even" > Must have tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a> </td> <td class="even" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="TypecastParenPad"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check to require spaces: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="TypecastParenPad"> <property name="option" value="space"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="TabCharacter"></a> <h2>TabCharacter</h2> <h3>Description</h3> <p> Checks that there are no tab characters (<span class="code">'\t'</span>) in the source code. </p> <p> Rationale: </p> <ul> <li> Developers should not need to configure the tab width of their text editors in order to be able to read source code. </li> <li> From the Apache jakarta coding standards: In a distributed development environment, when the cvs commit messages get sent to a mailing list, they are almost impossible to read if you use tabs. </li> </ul> <h3>Example</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="TabCharacter"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="WhitespaceAfter"></a> <h2>WhitespaceAfter</h2> <h3>Description</h3> <p> Checks that a token is followed by whitespace. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > tokens </td> <td class="odd" > tokens to check </td> <td class="odd" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a> </td> <td class="odd" > <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a> </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="WhitespaceAfter"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check for whitespace only after COMMA and SEMI tokens: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="WhitespaceAfter"> <property name="tokens" value="COMMA, SEMI"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> <a id="WhitespaceAround"></a> <h2>WhitespaceAround</h2> <h3>Description</h3> <p> Checks that a token is surrounded by whitespace. Empty constructor and method bodies (blocks) of the form </p> <p> <pre>public MyClass() {} // empty constructor public void func() {} // empty method</pre> </p> <p> may optionally be exempted from the policy using the <span class="code"> allowEmptyMethods</span> and <span class="code">allowEmptyConstructors </span> properties. </p> <h3>Properties</h3> <table> <tr class="even"> <th valign="top" align="left" > name </th> <th valign="top" align="left" > description </th> <th valign="top" align="left" > type </th> <th valign="top" align="left" > default value </th> </tr> <tr class="odd"> <td class="odd" > tokens </td> <td class="odd" > tokens to check </td> <td class="odd" > subset of tokens <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LCURLY">LCURLY</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ASSERT">LITERAL_ASSERT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_RETURN">LITERAL_RETURN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SYNCHRONIZED">LITERAL_SYNCHRONIZED</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">MINUS_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">MOD_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">PLUS_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RCURLY">RCURLY</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SLIST">SLIST</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">SL_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">SR_ASSIGN</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a>, <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">STAR_ASSIGN</a> <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GENERIC_START">GENERIC_START</a> <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GENERIC_END">GENERIC_END</a> <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPE_EXTENSION">AND TYPE_EXTENSION_AND</a> <a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#WILDCARD_TYPE">WILDCARD_TYPE</a> </td> <td class="odd" > all tokens </td> </tr> <tr class="even"> <td class="even" > allowEmptyConstructors </td> <td class="even" > allow empty constructor bodies </td> <td class="even" > </td> <td class="even" > </td> </tr> <tr class="odd"> <td class="odd" > allowEmptyMethods </td> <td class="odd" > allow empty method bodies </td> <td class="odd" > </td> <td class="odd" > </td> </tr> </table> <h3>Examples</h3> <p> To configure the check: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="WhitespaceAround"/></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <p> To configure the check for whitespace around the assignment operator, <span class="code">=</span>: </p> <div align="left"> <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#ffffff"><pre><module name="WhitespaceAround"> <property name="tokens" value="ASSIGN"/> </module></pre></td> <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> <tr> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> </tr> </table> </div> <h3>Package</h3> <p> com.puppycrawl.tools.checkstyle.checks.whitespace </p> <h3>Parent Module</h3> <p> <a href="config.html#treewalker">TreeWalker</a> </p> </div> </div> <div class="csBottomBar"> <div class="csBottomBarContents"> Copyright © 2001-2007, Oliver Burn </div> </div> </body> </html> <!-- end the processing -->