Package: org.gmetrics.metric.cyclomatic

## [Groovy] Class CyclomaticComplexityMetric

- org.gmetrics.metric.cyclomatic.CyclomaticComplexityMetric

- Metric for counting the (McCabe) Cyclomatic Complexity for methods and closure fields. The counting rules for Groovy:

         1. Each method starts with a complexity count of one.
         2. Add one to the complexity count for each occurrence of:
            if  while  for  case  catch  &&  ||  ?: (ternary-operator)  ?: (elvis-operator)  ?. (null-check)

  Additional notes:
  - If a class field is initialized to a Closure (ClosureExpression), then that Closure is analyzed just like a method.
  See http://en.wikipedia.org/wiki/Cyclomatic_complexity
  Authors:
    Chris Mair

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `String` | `name`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `MetricResult` | `calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)`
    `` | `MetricResult` | `calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractMethodMetric` | `applyToClosure, applyToMethod, calculate, calculate, calculateForClass`
    `class AbstractMetric` | `applyToClass, applyToPackage, calculateForClass, calculateForPackage, createAggregateMetricResult, isNotAnInterface`

- - ### Property Detail

    - #### final String name

  - ### Method Detail

    - #### MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)

    - #### MetricResult calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)