This commit is contained in:
Robert Sösemann
2016-03-23 09:58:22 +01:00
parent ff62b2545c
commit 00e3d9edc2

View File

@ -0,0 +1,32 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.apex.rule;
import java.util.List;
import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.rule.stat.StatisticalRule;
import net.sourceforge.pmd.lang.rule.stat.StatisticalRuleHelper;
import net.sourceforge.pmd.stat.DataPoint;
public abstract class AbstractStatisticalApexRule extends AbstractApexRule implements StatisticalRule {
private final StatisticalRuleHelper helper = new StatisticalRuleHelper(
this);
public void addDataPoint(DataPoint point) {
helper.addDataPoint(point);
}
public Object[] getViolationParameters(DataPoint point) {
return null;
}
@Override
public void apply(List<? extends Node> nodes, RuleContext ctx) {
super.apply(nodes, ctx);
helper.apply(ctx);
}
}