1 package net.sourceforge.pmd.lang.rule; 2 3 import net.sourceforge.pmd.Rule; 4 import net.sourceforge.pmd.RuleContext; 5 import net.sourceforge.pmd.lang.ast.Node; 6 7 /** 8 * This class handles of producing a Language specific RuleViolation and adding 9 * to a Report. 10 */ 11 public interface RuleViolationFactory { 12 /** 13 * Adds a violation to the report. 14 * 15 * @param ruleContext 16 * the RuleContext 17 * @param rule 18 * the rule 19 * @param node 20 * the node that produces the violation 21 * @param message 22 * specific message to put in the report 23 * @param args 24 * arguments to embed in the rule violation message 25 */ 26 void addViolation(RuleContext ruleContext, Rule rule, Node node, String message, Object[] args); 27 28 void addViolation(RuleContext ruleContext, Rule rule, Node node, String message, int beginLine, int endLine, Object[] args); 29 }