View Javadoc

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;
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      void setName(String name);
23  
24      String getRuleSetName();
25  
26      void setRuleSetName(String name);
27  
28      void setMessage(String message);
29  
30      void setDescription(String description);
31  
32      void setExample(String example);
33  
34      void apply(List astCompilationUnits, RuleContext ctx);
35  
36      boolean hasProperty(String name);
37  
38      void addProperty(String name, String property);
39      
40      void addProperties(Properties properties);
41  
42      int getIntProperty(String name);
43  
44      boolean getBooleanProperty(String name);
45  
46      String getStringProperty(String name);
47  
48      double getDoubleProperty(String name);
49  
50      Properties getProperties();
51  
52      boolean include();
53  
54      void setInclude(boolean include);
55  
56      int getPriority();
57  
58      String getPriorityName();
59  
60      void setPriority(int priority);
61  
62      void setUsesSymbolTable();
63  
64      boolean usesSymbolTable();
65  
66      void setUsesDFA();
67  
68      boolean usesDFA();
69  }