com.puppycrawl.tools.checkstyle.checks.blocks

Class RightCurlyCheck

public class RightCurlyCheck extends AbstractOptionCheck

Checks the placement of right curly braces. The policy to verify is specified using the RightCurlyOption class and defaults to SAME.

By default the check will check the following tokens: LITERAL_TRY. LITERAL_CATCH, LITERAL_FINALLY. LITERAL_IF, LITERAL_ELSE,

An example of how to configure the check is:

 <module name="RightCurly"/>
 

An example of how to configure the check with policy ALONE for else tokens is:

 <module name="RightCurly">
     <property name="tokens" value="LITERAL_ELSE"/>
     <property name="option" value="alone"/>
 </module>
 

Version: 2.0

Author: Oliver Burn lkuehne o_sukhodolsky

Constructor Summary
RightCurlyCheck()
Sets the right curly option to same.
Method Summary
int[]getDefaultTokens()
voidsetShouldStartLine(boolean aFlag)
Does the check need to check if rcurly starts line.
voidvisitToken(DetailAST aAST)

Constructor Detail

RightCurlyCheck

public RightCurlyCheck()
Sets the right curly option to same.

Method Detail

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc }

setShouldStartLine

public void setShouldStartLine(boolean aFlag)
Does the check need to check if rcurly starts line.

Parameters: aFlag new value of this property.

visitToken

public void visitToken(DetailAST aAST)
{@inheritDoc }