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