Package net.sourceforge.pmd.lang.rule
Class AbstractRuleViolationFactory
- java.lang.Object
-
- net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory
-
- All Implemented Interfaces:
RuleViolationFactory
public abstract class AbstractRuleViolationFactory extends Object implements RuleViolationFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractRuleViolationFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addViolation(RuleContext ruleContext, Rule rule, Node node, String message, int beginLine, int endLine, Object[] args)
void
addViolation(RuleContext ruleContext, Rule rule, Node node, String message, Object[] args)
Adds a violation to the report.protected abstract RuleViolation
createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message)
protected abstract RuleViolation
createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message, int beginLine, int endLine)
-
-
-
Method Detail
-
addViolation
public void addViolation(RuleContext ruleContext, Rule rule, Node node, String message, Object[] args)
Description copied from interface:RuleViolationFactory
Adds a violation to the report.- Specified by:
addViolation
in interfaceRuleViolationFactory
- Parameters:
ruleContext
- the RuleContextrule
- the rulenode
- the node that produces the violationmessage
- specific message to put in the reportargs
- arguments to embed in the rule violation message
-
addViolation
public void addViolation(RuleContext ruleContext, Rule rule, Node node, String message, int beginLine, int endLine, Object[] args)
- Specified by:
addViolation
in interfaceRuleViolationFactory
-
createRuleViolation
protected abstract RuleViolation createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message)
-
createRuleViolation
protected abstract RuleViolation createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message, int beginLine, int endLine)
-
-