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