Package: groovy.org.codenarc.rule.size

## [Groovy] Class AbstractMethodMetricAstVisitor

- groovy.org.codenarc.rule.size.AbstractMethodMetricAstVisitor

- Abstract superclass for AstVisitor classes that use method-level GMetrics Metrics. Subclasses must:

  - Implement the abstract `createMetric()` method
  - Implement the abstract `getMetricShortDescription()` method
  - Implement the abstract `getMaxMethodMetricValue()` method
  - Implement the abstract `getMaxClassAverageMethodMetricValue()` method
  - The owning Rule class must have the `ignoreMethodNames` property
  Authors:
    Chris Mair
    Hamlet D'Arcy

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected org.gmetrics.metric.Metric` | `metric` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `addViolation(def classResults, String message)`
    `` | `protected def` | `createMetric()`
    `` | `protected String` | `extractMethodName(def method)`
    `` | `protected def` | `getLineNumber(def methodResults)`
    `` | `protected Object` | `getMaxClassAverageMethodMetricValue()`
    `` | `protected Object` | `getMaxClassMetricValue()`
    `` | `protected Object` | `getMaxMethodMetricValue()`
    `` | `protected String` | `getMetricShortDescription()`
    `` | `protected String` | `getSourceLine(def lineNumber)`
    `` | `protected boolean` | `isIgnoredMethodName(String methodName)`
    `` | `void` | `visitClassEx(org.codehaus.groovy.ast.ClassNode classNode)`

- - ### Field Detail

    - #### protected org.gmetrics.metric.Metric metric

  - ### Method Detail

    - #### protected void addViolation(def classResults, String message)

    - #### protected def createMetric()

    - #### protected String extractMethodName(def method)

    - #### protected def getLineNumber(def methodResults)

    - #### protected Object getMaxClassAverageMethodMetricValue()

    - #### protected Object getMaxClassMetricValue()

    - #### protected Object getMaxMethodMetricValue()

    - #### protected String getMetricShortDescription()

    - #### protected String getSourceLine(def lineNumber)

    - #### protected boolean isIgnoredMethodName(String methodName)

    - #### void visitClassEx(org.codehaus.groovy.ast.ClassNode classNode)