Search in sources :

Example 1 with CCVisitor

use of org.eclipse.titanium.metrics.visitors.CCVisitor in project titan.EclipsePlug-ins by eclipse.

the class AMCyclomaticComplexity method measure.

@Override
public Number measure(final MetricData data, final Def_Altstep altstep) {
    final Counter count = new Counter(0);
    altstep.accept(new CCVisitor(count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) CCVisitor(org.eclipse.titanium.metrics.visitors.CCVisitor)

Example 2 with CCVisitor

use of org.eclipse.titanium.metrics.visitors.CCVisitor in project titan.EclipsePlug-ins by eclipse.

the class TMCyclomaticComplexity method measure.

@Override
public Number measure(final MetricData data, final Def_Testcase testcase) {
    final Counter count = new Counter(0);
    testcase.accept(new CCVisitor(count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) CCVisitor(org.eclipse.titanium.metrics.visitors.CCVisitor)

Example 3 with CCVisitor

use of org.eclipse.titanium.metrics.visitors.CCVisitor in project titan.EclipsePlug-ins by eclipse.

the class FMCyclomaticComplexity method measure.

@Override
public Number measure(final MetricData data, final Def_Function function) {
    final Counter count = new Counter(0);
    function.accept(new CCVisitor(count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) CCVisitor(org.eclipse.titanium.metrics.visitors.CCVisitor)

Aggregations

CCVisitor (org.eclipse.titanium.metrics.visitors.CCVisitor)3 Counter (org.eclipse.titanium.metrics.visitors.Counter)3