Class AbstractMetric

    • Constructor Detail

      • AbstractMetric

        public AbstractMetric()
    • Method Detail

      • getMetaClass

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

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

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

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

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

        public boolean getEnabled()
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface Metric
      • setEnabled

        public void setEnabled​(boolean value)
      • getFunctions

        public java.util.List<java.lang.String> getFunctions()
        Specified by:
        getFunctions in interface Metric
      • setFunctions

        public void setFunctions​(java.util.List<java.lang.String> value)
      • calculateForClass

        protected abstract ClassMetricResult calculateForClass​(org.codehaus.groovy.ast.ClassNode classNode,
                                                               SourceCode sourceCode)
      • calculateForPackage

        protected MetricResult calculateForPackage​(java.lang.String path,
                                                   java.lang.String packageName,
                                                   java.util.Collection<MetricResult> childMetricResults)
      • isNotAnInterface

        protected boolean isNotAnInterface​(org.codehaus.groovy.ast.ClassNode classNode)
      • createAggregateMetricResult

        protected MetricResult createAggregateMetricResult​(MetricLevel metricLevel,
                                                           java.util.Collection<MetricResult> childMetricResults,
                                                           org.codehaus.groovy.ast.ASTNode node)