Class AbstractMethodMetricAstVisitor

    • Field Detail

      • metric

        protected org.gmetrics.metric.Metric metric
    • Constructor Detail

      • AbstractMethodMetricAstVisitor

        public AbstractMethodMetricAstVisitor()
    • 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 Object invokeMethod​(String method,
                                   Object arguments)
        Specified by:
        invokeMethod in interface groovy.lang.GroovyObject
      • getProperty

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

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

        protected abstract org.gmetrics.metric.Metric createMetric()
      • getMetricShortDescription

        protected abstract String getMetricShortDescription()
      • getMaxMethodMetricValue

        protected abstract Object getMaxMethodMetricValue()
      • getMaxClassMetricValue

        protected abstract Object getMaxClassMetricValue()
      • getMaxClassAverageMethodMetricValue

        protected abstract Object getMaxClassAverageMethodMetricValue()
      • extractMethodName

        protected String extractMethodName​(Object method)
      • addViolation

        protected void addViolation​(org.gmetrics.result.MetricResult classResults,
                                    String message)
      • getLineNumber

        protected Integer getLineNumber​(org.gmetrics.result.MetricResult methodResults)
      • getSourceLine

        protected String getSourceLine​(Integer lineNumber)
      • isIgnoredMethodName

        protected boolean isIgnoredMethodName​(String methodName)