com.puppycrawl.tools.checkstyle.checks.coding
Class ReturnCountCheck
- Configurable, Contextualizable
public final class ReturnCountCheck
Restricts return statements to a specified count (default = 2).
Ignores specified methods (
equals() by default).
Rationale: Too many return points can be indication that code is
attempting to do too much or may be difficult to understand.
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken |
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity |
ReturnCountCheck
public ReturnCountCheck()
Creates new instance of the checks.
getMax
public int getMax()
Getter for max property.
- maximum allowed number of return statements.
setMax
public void setMax(int aMax)
Setter for max property.
aMax - maximum allowed number of return statements.