Search in sources :

Example 1 with DepthVisitor

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

the class FMNesting method measure.

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

Example 2 with DepthVisitor

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

the class AMNesting method measure.

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

Example 3 with DepthVisitor

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

the class TMNesting method measure.

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

Aggregations

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