org.gmetrics.metric.linecount
Class MethodLineCountMetric

java.lang.Object
  extended by org.gmetrics.metric.AbstractMetric
      extended by org.gmetrics.metric.AbstractMethodMetric
          extended by org.gmetrics.metric.linecount.MethodLineCountMetric
All Implemented Interfaces:
groovy.lang.GroovyObject, Metric

public class MethodLineCountMetric
extends AbstractMethodMetric
implements groovy.lang.GroovyObject

Metric for counting the lines of code for methods and closure fields.

Version:
$Revision: 30 $ - $Date: 2009-12-14 22:49:35 -0500 (Mon, 14 Dec 2009) $
Author:
Chris Mair

Constructor Summary
MethodLineCountMetric()
           
 
Method Summary
 java.lang.Object calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
           
 java.lang.Object calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
           
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.String getName()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class org.gmetrics.metric.AbstractMethodMetric
calculateForClass, getBaseLevel
 
Methods inherited from class org.gmetrics.metric.AbstractMetric
applyToClass, applyToPackage, calculateForPackage, createAggregateMetricResult, getEnabled, isEnabled, isNotAnInterface, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodLineCountMetric

public MethodLineCountMetric()
Method Detail

getName

public final java.lang.String getName()
Specified by:
getName in interface Metric

calculate

public java.lang.Object calculate(org.codehaus.groovy.ast.MethodNode methodNode,
                                  SourceCode sourceCode)
Specified by:
calculate in class AbstractMethodMetric

calculate

public java.lang.Object calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression,
                                  SourceCode sourceCode)
Specified by:
calculate in class AbstractMethodMetric

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class AbstractMethodMetric

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class AbstractMethodMetric

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class AbstractMethodMetric

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class AbstractMethodMetric

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class AbstractMethodMetric


Copyright © 2010. All Rights Reserved.