View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.jsp.rule;
5   
6   import net.sourceforge.pmd.Rule;
7   import net.sourceforge.pmd.RuleContext;
8   import net.sourceforge.pmd.RuleViolation;
9   import net.sourceforge.pmd.lang.ast.Node;
10  import net.sourceforge.pmd.lang.jsp.ast.JspNode;
11  import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory;
12  import net.sourceforge.pmd.lang.rule.ParametricRuleViolation;
13  import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
14  
15  public final class JspRuleViolationFactory extends AbstractRuleViolationFactory {
16  
17      public static final RuleViolationFactory INSTANCE = new JspRuleViolationFactory();
18  
19      private JspRuleViolationFactory() {
20      }
21  
22      @Override
23      protected RuleViolation createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message) {
24      	return new ParametricRuleViolation<JspNode>(rule, ruleContext, (JspNode) node, message);
25      }
26      
27      protected RuleViolation createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message, int beginLine, int endLine) {
28  		return null;	// FIXME
29  	}
30  }