1
2
3
4 package net.sourceforge.pmd.lang.java.rule.controversial;
5
6 import net.sourceforge.pmd.Rule;
7 import net.sourceforge.pmd.RuleContext;
8 import net.sourceforge.pmd.lang.ast.Node;
9 import net.sourceforge.pmd.lang.java.ast.JavaNode;
10 import net.sourceforge.pmd.lang.java.rule.JavaRuleViolation;
11
12
13
14
15
16
17
18
19 public class DaaRuleViolation extends JavaRuleViolation {
20
21 private final String variableName;
22 private final String type;
23
24 public DaaRuleViolation(Rule rule, RuleContext ctx, Node node, String type, String msg, String var, int beginLine, int endLine) {
25 super(rule, ctx, (JavaNode)node, msg);
26 this.variableName = var;
27 setLines(beginLine, endLine);
28 this.type = type;
29 }
30
31 public String getVariableName() {
32 return variableName;
33 }
34
35 public String getType() {
36 return type;
37 }
38 }