KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > Rule


1 /**
2  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3  */

4 package net.sourceforge.pmd;
5
6 import java.util.List JavaDoc;
7 import java.util.Properties JavaDoc;
8
9 public interface Rule {
10
11     public static final int LOWEST_PRIORITY = 5;
12     public static final String JavaDoc[] PRIORITIES = {"High", "Medium High", "Medium", "Medium Low", "Low"};
13
14     String JavaDoc getName();
15
16     String JavaDoc getMessage();
17
18     String JavaDoc getDescription();
19
20     String JavaDoc getExample();
21
22     String JavaDoc getExternalInfoUrl();
23
24     void setName(String JavaDoc name);
25
26     String JavaDoc getRuleSetName();
27
28     void setRuleSetName(String JavaDoc name);
29
30     void setMessage(String JavaDoc message);
31
32     void setDescription(String JavaDoc description);
33
34     void setExample(String JavaDoc example);
35
36     void setExternalInfoUrl(String JavaDoc url);
37
38     void apply(List JavaDoc astCompilationUnits, RuleContext ctx);
39
40     boolean hasProperty(String JavaDoc name);
41
42     void addProperty(String JavaDoc name, String JavaDoc property);
43
44     void addProperties(Properties JavaDoc properties);
45
46     int getIntProperty(String JavaDoc name);
47
48     boolean getBooleanProperty(String JavaDoc name);
49
50     String JavaDoc getStringProperty(String JavaDoc name);
51
52     double getDoubleProperty(String JavaDoc name);
53
54     Properties JavaDoc getProperties();
55
56     boolean include();
57
58     void setInclude(boolean include);
59
60     int getPriority();
61
62     String JavaDoc getPriorityName();
63
64     void setPriority(int priority);
65
66     void setUsesDFA();
67
68     boolean usesDFA();
69     
70     PropertyDescriptor propertyDescriptorFor(String JavaDoc name);
71
72     void setUsesTypeResolution();
73
74     boolean usesTypeResolution();
75 }
76
Popular Tags