cyvis.core.metrics
Class MethodMetric

java.lang.Object
  extended by cyvis.core.metrics.MethodMetric

public class MethodMetric
extends Object

Metrics extracted from a method.


Field Summary
 int cyclomaticComplexity
           
 int length
           
 String name
           
static cyvis.core.metrics.MethodMetric._ReverseCcComparator REVERSE_CC_COMPARATOR
          A comparator for MethodMetric objects, ordering by cyclomatic complexity then length, in reverse.
 
Constructor Summary
MethodMetric(MethodNode method)
          Extracts method metrics from the given MethodNode.
 
Method Summary
 void generateText(Writer out)
          Generates a fragment of a plain-text report for this method's metrics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVERSE_CC_COMPARATOR

public static final cyvis.core.metrics.MethodMetric._ReverseCcComparator REVERSE_CC_COMPARATOR
A comparator for MethodMetric objects, ordering by cyclomatic complexity then length, in reverse.

Note: this comparator imposes orderings that are inconsistent with equals.


name

public final String name

cyclomaticComplexity

public final int cyclomaticComplexity

length

public final int length
Constructor Detail

MethodMetric

public MethodMetric(MethodNode method)
Extracts method metrics from the given MethodNode.

Method Detail

generateText

public void generateText(Writer out)
                  throws IOException
Generates a fragment of a plain-text report for this method's metrics. Used by ClassMetric.generateText(Writer).

Parameters:
out - Writer to which the report fragment is written
Throws:
IOException