com.puppycrawl.tools.checkstyle.checks.coding
public class DefaultComesLastCheck extends Check
Check that the default is after all the cases
in a switch statement.
Rationale: Java allows default anywhere within the
switch statement. But if it comes after the last
case then it is more readable.
An example of how to configure the check is:
<module name="DefaultComesLast"/>
| Constructor Summary | |
|---|---|
| DefaultComesLastCheck() Creates new instance of the check. | |
| Method Summary | |
|---|---|
| int[] | getAcceptableTokens() |
| int[] | getDefaultTokens() |
| void | visitToken(DetailAST aAST) |