com.puppycrawl.tools.checkstyle.checks.blocks
public class RightCurlyCheck extends AbstractOptionCheck
Checks the placement of right curly braces. The policy to verify is specified using the {@link RightCurlyOption} class and defaults to {@link RightCurlyOption#SAME}.
By default the check will check the following tokens: {@link TokenTypes#LITERAL_CATCH LITERAL_CATCH}, {@link TokenTypes#LITERAL_ELSE LITERAL_ELSE}, {@link TokenTypes#LITERAL_TRY LITERAL_TRY}.
An example of how to configure the check is:
<module name="RightCurly"/>
An example of how to configure the check with policy
{@link RightCurlyOption#ALONE} for else tokens is:
<module name="RightCurly">
<property name="tokens" value="LITERAL_ELSE"/>
<property name="option" value="alone"/>
</module>
Version: 1.0
| Constructor Summary | |
|---|---|
| RightCurlyCheck()
Sets the right curly option to same. | |
| Method Summary | |
|---|---|
| int[] | getDefaultTokens() {@inheritDoc} |
| void | visitToken(DetailAST aAST) {@inheritDoc} |