|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<LeftCurlyOption>
com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyOption
public enum LeftCurlyOption
Represents the options for placing the left curly brace '{'.
| Enum Constant Summary | |
|---|---|
EOL
Represents the policy for placing the brace at the end of line. |
|
NL
Represents the policy that the brace must always be on a new line. |
|
NLOW
Represents the policy that if the brace will fit on the first line of the statement, taking into account maximum line length, then apply EOL rule. |
|
| Method Summary | |
|---|---|
static LeftCurlyOption |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static LeftCurlyOption[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final LeftCurlyOption EOL
if (condition) {
...
public static final LeftCurlyOption NLOW
EOL rule. Otherwise apply the NL
rule. NLOW is a mnemonic for "new line on wrap".
For the example above Checkstyle will enforce:
if (condition) {
...
But for a statement spanning multiple lines, Checkstyle will enforce:
if (condition1 && condition2 &&
condition3 && condition4)
{
...
public static final LeftCurlyOption NL
if (condition)
{
...
| Method Detail |
|---|
public static LeftCurlyOption[] values()
for (LeftCurlyOption c : LeftCurlyOption.values()) System.out.println(c);
public static LeftCurlyOption valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
Back to the Checkstyle Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||