Package: org.gmetrics.metric.abc

## [Groovy] Class AbcMetric

- org.gmetrics.metric.abc.AbcMetric

- Calculate the ABC Metric for a class/method. The ABC Counting Rules for Groovy:

         1. Add one to the assignment count for each occurrence of an assignment operator, excluding
            constant declarations:    = *= /= %= += <<= >>= &= |= ^= >>>=
         2. Add one to the assignment count for each occurrence of an increment or decrement operator
            (prefix or postfix):    ++ --
         3. Add one to the branch count for each function call or class method call.
         4. Add one to the branch count for each occurrence of the new operator.
         5. Add one to the condition count for each use of a conditional operator:
            == != <= >= < > <=> =~ ==~
         6. Add one to the condition count for each use of the following keywords:
            else case default try catch ?
         7. Add one to the condition count for each unary conditional expression. These are cases where
            a single variable/field/value is treated as a boolean value. Examples include if (x)
            and return !ready.

  Additional notes:
  - A property access is treated like a method call (and thus increments the branch count).
  - If a class field is initialized to a Closure (ClosureExpression), then that Closure is analyzed just like a method.
  See http://www.softwarerenovation.com/ABCMetric.pdf
  Authors:
    Chris Mair
  Version:
    \$Revision: 218 \$ - \$Date: 2012-01-07 08:40:26 -0500 (Sat, 07 Jan 2012) \$

- - ### 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)`
    `` | `protected MetricResult` | `createAggregateMetricResult(MetricLevel metricLevel, Collection childMetricResults, org.codehaus.groovy.ast.ASTNode node)`

  - ### 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)

    - #### @Override protected MetricResult createAggregateMetricResult(MetricLevel metricLevel, Collection childMetricResults, org.codehaus.groovy.ast.ASTNode node)