Class AbstractCoberturaCoverageMetric

    • Field Detail

      • ROUNDING_MODE

        protected static final int ROUNDING_MODE
      • LOG

        protected static final java.lang.Object LOG
    • Constructor Detail

      • AbstractCoberturaCoverageMetric

        public AbstractCoberturaCoverageMetric()
    • Method Detail

      • getMetaClass

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

        public void setMetaClass​(groovy.lang.MetaClass mc)
        Specified by:
        setMetaClass in interface groovy.lang.GroovyObject
        Overrides:
        setMetaClass in class AbstractMetric
      • invokeMethod

        public java.lang.Object invokeMethod​(java.lang.String method,
                                             java.lang.Object arguments)
        Specified by:
        invokeMethod in interface groovy.lang.GroovyObject
        Overrides:
        invokeMethod in class AbstractMetric
      • getProperty

        public java.lang.Object getProperty​(java.lang.String property)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
        Overrides:
        getProperty in class AbstractMetric
      • setProperty

        public void setProperty​(java.lang.String property,
                                java.lang.Object value)
        Specified by:
        setProperty in interface groovy.lang.GroovyObject
        Overrides:
        setProperty in class AbstractMetric
      • getCoberturaFile

        public java.lang.String getCoberturaFile()
      • setCoberturaFile

        public void setCoberturaFile​(java.lang.String value)
      • getAttributeName

        protected abstract java.lang.String getAttributeName()
      • getCoverageRatioForSingleClass

        protected abstract Ratio getCoverageRatioForSingleClass​(java.lang.Object matchingClassElement)
      • calculate

        public MetricResult calculate​(org.codehaus.groovy.ast.MethodNode methodNode,
                                      SourceCode sourceCode)
      • getCoverageRatioForClass

        protected Ratio getCoverageRatioForClass​(java.lang.String className)
      • calculateMethodResult

        protected SingleNumberMetricResult calculateMethodResult​(org.codehaus.groovy.ast.MethodNode methodNode,
                                                                 groovy.util.slurpersupport.GPathResult classXmlElement)
      • findMethodElement

        protected groovy.util.slurpersupport.GPathResult findMethodElement​(org.codehaus.groovy.ast.MethodNode methodNode,
                                                                           groovy.util.slurpersupport.GPathResult classXmlElement)