com.puppycrawl.tools.checkstyle.checks.metrics

Class NPathComplexityCheck

public final class NPathComplexityCheck extends AbstractComplexityCheck

Checks the npath complexity against a specified limt (default = 200). The npath metric computes the number of possible execution paths through a function. Similar to the cyclomatic complexity but also takes into account the nesting of conditional statements and multi-part boolean expressions.

Author: Simon Harris o_sukhodolsky TODO: For every or: _value += (_orCount * (nestedValue - 1)); TODO: For every and: ???

Constructor Summary
NPathComplexityCheck()
Creates new instance of the check.
Method Summary
int[]getDefaultTokens()
protected StringgetMessageID()
voidleaveToken(DetailAST aAST)
voidvisitToken(DetailAST aAST)

Constructor Detail

NPathComplexityCheck

public NPathComplexityCheck()
Creates new instance of the check.

Method Detail

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc }

getMessageID

protected String getMessageID()
{@inheritDoc }

leaveToken

public void leaveToken(DetailAST aAST)
{@inheritDoc }

visitToken

public void visitToken(DetailAST aAST)
{@inheritDoc }