Groovy Documentation

groovy.org.codenarc.rule.size
[Groovy] Class AbstractMethodMetricAstVisitor

java.lang.Object
  org.codenarc.rule.AbstractAstVisitor
      groovy.org.codenarc.rule.size.AbstractMethodMetricAstVisitor

@SuppressWarnings('DuplicateLiteral')
abstract class AbstractMethodMetricAstVisitor
extends AbstractAstVisitor

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

Authors:
Chris Mair
Hamlet D'Arcy


Field Summary
protected org.gmetrics.metric.Metric metric

 
Method Summary
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

metric

protected org.gmetrics.metric.Metric metric


 
Method Detail

addViolation

protected void addViolation(def classResults, String message)


createMetric

protected def createMetric()


extractMethodName

protected String extractMethodName(def method)


getLineNumber

protected def getLineNumber(def methodResults)


getMaxClassAverageMethodMetricValue

protected Object getMaxClassAverageMethodMetricValue()


getMaxClassMetricValue

protected Object getMaxClassMetricValue()


getMaxMethodMetricValue

protected Object getMaxMethodMetricValue()


getMetricShortDescription

protected String getMetricShortDescription()


getSourceLine

protected String getSourceLine(def lineNumber)


isIgnoredMethodName

protected boolean isIgnoredMethodName(String methodName)


visitClassEx

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


 

Groovy Documentation