net.sourceforge.pmd.lang.rule

## Class AbstractRuleViolationFactory

- java.lang.Object
- - net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory

- All Implemented Interfaces:
    RuleViolationFactory
  Direct Known Subclasses:
    EcmascriptRuleViolationFactory, JavaRuleViolationFactory, JspRuleViolationFactory, XmlRuleViolationFactory

      public abstract class AbstractRuleViolationFactory
      extends Object
      implements RuleViolationFactory

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractRuleViolationFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractRuleViolationFactory

          public AbstractRuleViolationFactory()

  - ### 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 interface `RuleViolationFactory`
      Parameters:
        `ruleContext` - the RuleContext
        `rule` - the rule
        `node` - the node that produces the violation
        `message` - specific message to put in the report
        `args` - 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 interface `RuleViolationFactory`

    - #### 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)

Copyright © 2002-2013 InfoEther. All Rights Reserved.