com.puppycrawl.tools.checkstyle.checks.blocks
Class BlockOption
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.AbstractOption
com.puppycrawl.tools.checkstyle.checks.blocks.BlockOption
- All Implemented Interfaces:
- Serializable
- public final class BlockOption
- extends AbstractOption
Represents the policy for checking block statements.
- Author:
- Rick Giles
- See Also:
EmptyBlockCheck
,
Serialized Form
Field Summary |
static BlockOption |
STMT
Represents the policy that there is a statement in the block. |
static BlockOption |
TEXT
Represents the policy that there is some text in the block. |
Method Summary |
protected Map |
getStrToOpt()
Returns the map from string representations to options. |
TEXT
public static final BlockOption TEXT
- Represents the policy that there is some text in the block. For example:
catch (Exception ex) {
// This is a bad coding practice
}
STMT
public static final BlockOption STMT
- Represents the policy that there is a statement in the block. For
example:
finally {
lock.release();
}
getStrToOpt
protected Map getStrToOpt()
- Returns the map from string representations to options.
- Specified by:
getStrToOpt
in class AbstractOption
- Returns:
Map
from strings to options.