View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.plsql.rule;
5   
6   import java.util.List;
7   
8   import net.sourceforge.pmd.RuleContext;
9   import net.sourceforge.pmd.lang.ast.Node;
10  import net.sourceforge.pmd.lang.rule.stat.StatisticalRule;
11  import net.sourceforge.pmd.lang.rule.stat.StatisticalRuleHelper;
12  import net.sourceforge.pmd.stat.DataPoint;
13  
14  public abstract class AbstractStatisticalPLSQLRule extends AbstractPLSQLRule implements StatisticalRule {
15  
16      private final StatisticalRuleHelper helper = new StatisticalRuleHelper(this);
17  
18      public void addDataPoint(DataPoint point) {
19  	helper.addDataPoint(point);
20      }
21  
22      public Object[] getViolationParameters(DataPoint point) {
23  	return null;
24      }
25  
26      @Override
27      public void apply(List<? extends Node> nodes, RuleContext ctx) {
28  	super.apply(nodes, ctx);
29  	helper.apply(ctx);
30      }
31  }