checkstyle/docs/config_whitespace.html

981 lines
36 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Checks for whitespace</title>
<link rel="stylesheet" type="text/css" href="mystyle.css"/>
</head>
<body>
<!-- The header -->
<table border="0" width="100%" summary="header layout">
<tr>
<td><h1>Checks for whitespace</h1></td>
<td align="right"><img src="logo.png" alt="Checkstyle Logo"/></td>
</tr>
</table>
<!-- content -->
<table border="0" width="100%" cellpadding="5" summary="body layout">
<tr>
<!--Left menu-->
<td class="menu" valign="top">
<ul>
<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>
</ul>
</td>
<!--Content-->
<td class="content" valign="top" align="left">
<a name="EmptyForInitializerPad"></a> <h2>EmptyForInitializerPad</h2> <h4>Description</h4>
<p class="body">
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>
<pre class="body">
for (
; i < j; i++, j--)
</pre>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>option</td>
<td>policy on how to pad an empty for iterator</td>
<td><a href="property_types.html#parenPad">pad policy</a></td>
<td><span class="default">nospace</span></td>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;EmptyForInitializerPad&quot;/&gt;
</pre>
<p class="body">
To configure the check to require white space at an empty for iterator:
</p>
<pre class="body">
&lt;module name=&quot;EmptyForInitializerPad&quot;&gt;
&lt;property name=&quot;option&quot; value=&quot;space&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="EmptyForIteratorPad"></a> <h2>EmptyForIteratorPad</h2> <h4>Description</h4>
<p class="body">
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>
<pre class="body">
for (Iterator foo = very.long.line.iterator();
foo.hasNext();
)
</pre>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>option</td>
<td>policy on how to pad an empty for iterator</td>
<td><a href="property_types.html#parenPad">pad policy</a></td>
<td><span class="default">nospace</span></td>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;EmptyForIteratorPad&quot;/&gt;
</pre>
<p class="body">
To configure the check to require white space at an empty for iterator:
</p>
<pre class="body">
&lt;module name=&quot;EmptyForIteratorPad&quot;&gt;
&lt;property name=&quot;option&quot; value=&quot;space&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="MethodParamPad"></a> <h2>MethodParamPad</h2>
<h4>Description</h4>
<p class="body">
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>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>allowLineBreaks</td>
<td>whether a line break between the identifier and left parenthesis
is allowed</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;MethodParamPad&quot;/&gt;
</pre>
<p class="body">
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>
<pre class="body">
&lt;module name=&quot;MethodParamPad&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;METHOD_DEF&quot;/&gt;
&lt;property name=&quot;option&quot; value=&quot;space&quot;/&gt;
&lt;property name=&quot;allowLineBreaks&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="NoWhitespaceAfter"></a> <h2>NoWhitespaceAfter</h2>
<h4>Description</h4>
<p class="body">
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>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>allowLineBreaks</td>
<td>whether whitespace is allowed if the token is at a linebreak</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">true</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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></td>
<td><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>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;NoWhitespaceAfter&quot;/&gt;
</pre>
<p class="body">
To configure the check to forbid linebreaks after a DOT token:
</p>
<pre class="body">
&lt;module name=&quot;NoWhitespaceAfter&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;DOT&quot;/&gt;
&lt;property name=&quot;allowLineBreaks&quot; value=&quot;false&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="NoWhitespaceBefore"></a> <h2>NoWhitespaceBefore</h2> <h4>Description</h4>
<p class="body">
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>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>allowLineBreaks</td>
<td>whether whitespace is allowed if the token is at a linebreak</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;NoWhitespaceBefore&quot;/&gt;
</pre>
<p class="body">
To configure the check to allow linebreaks before a DOT token:
</p>
<pre class="body">
&lt;module name=&quot;NoWhitespaceBefore&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;DOT&quot;/&gt;
&lt;property name=&quot;allowLineBreaks&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="OperatorWrap"></a> <h2>OperatorWrap</h2> <h4>Description</h4>
<p class="body">
Checks the policy on how to wrap lines on operators.
</p>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>option</td>
<td>policy on how to wrap lines</td>
<td><a href="property_types.html#wrapOp">wrap operator policy</a></td>
<td><span class="default">nl</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;OperatorWrap&quot;/&gt;
</pre>
<p class="body">
To configure the check for the assignment operator, <span class="code">=</span>,
at the end of a line:
</p>
<pre class="body">
&lt;module name=&quot;OperatorWrap&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;ASSIGN&quot;/&gt;
&lt;property name=&quot;option&quot; value=&quot;eol&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="ParenPad"></a> <h2>ParenPad</h2> <h4>Description</h4>
<p class="body">
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>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>option</td>
<td>policy on how to pad parentheses</td>
<td><a href="property_types.html#parenPad">pad policy</a></td>
<td><span class="default">nospace</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;ParenPad&quot;/&gt;
</pre>
<p class="body">
To configure the check to require spaces for the parentheses of constructor,
method, and super constructor calls:
</p>
<pre class="body">
&lt;module name=&quot;ParenPad&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;CTOR_CALL, METHOD_CALL,
SUPER_CTOR_CALL&quot;/&gt;
&lt;property name=&quot;option&quot; value=&quot;space&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="TypecastParenPad"></a>
<h2>TypecastParenPad</h2>
<h4>Description</h4>
<p class="body"> 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>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>option</td>
<td>policy on how to pad parentheses</td>
<td><a href="property_types.html#parenPad">pad policy</a></td>
<td><span class="default">nospace</span></td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;TypecastParenPad&quot;/&gt;
</pre>
<p class="body">
To configure the check to require spaces:
</p>
<pre class="body">
&lt;module name=&quot;TypecastParenPad&quot;&gt;
&lt;property name=&quot;option&quot; value=&quot;space&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="TabCharacter"></a> <h2>TabCharacter</h2> <h4>Description</h4>
<p class="body">
Checks that there are no tab characters (<span class="code">'\t'</span>) in the
source code.
</p>
<p class="body">
Rationale:
</p>
<ul class="body">
<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>
<h4>Example</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;TabCharacter&quot;/&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="WhitespaceAfter"></a> <h2>WhitespaceAfter</h2> <h4>Description</h4>
<p class="body">
Checks that a token is followed by whitespace.
</p>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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><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>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;WhitespaceAfter&quot;/&gt;
</pre>
<p class="body">
To configure the check for whitespace only after COMMA and SEMI tokens:
</p>
<pre class="body">
&lt;module name=&quot;WhitespaceAfter&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;COMMA, SEMI&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
<a name="WhitespaceAround"></a> <h2>WhitespaceAround</h2> <h4>Description</h4>
<p class="body">
Checks that a token is surrounded by whitespace.
</p>
<h4>Properties</h4>
<table width="100%" border="1" cellpadding="5" class="body">
<tr class="header">
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>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></td>
<td>all tokens</td>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the check:
</p>
<pre class="body">
&lt;module name=&quot;WhitespaceAround&quot;/&gt;
</pre>
<p class="body">
To configure the check for whitespace around the assignment operator, <span class="code">=</span>:
</p>
<pre class="body">
&lt;module name=&quot;WhitespaceAround&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;ASSIGN&quot;/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
com.puppycrawl.tools.checkstyle.checks.whitespace
</p>
<h4>Parent Module</h4>
<p class="body">
<a href="config.html#treewalker">TreeWalker</a>
</p>
</td>
</tr>
</table>
<hr />
<div><a href="index.html">Back to the Checkstyle Home Page</a></div>
<p class="copyright">
Copyright &copy; 2002-2004 Oliver Burn. All rights Reserved.
</p>
</body>
</html>