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      public static final int LOWEST_PRIORITY = 5;
11      public static final String[] PRIORITIES = {"High", "Medium High", "Medium", "Medium Low", "Low"};
12  
13      String getName();
14  
15      String getMessage();
16  
17      String getDescription();
18  
19      String getExample();
20  
21      void setName(String name);
22  
23      void setMessage(String message);
24  
25      void setDescription(String description);
26  
27      void setExample(String example);
28  
29      void apply(List astCompilationUnits, RuleContext ctx);
30  
31      boolean hasProperty(String name);
32  
33      void addProperty(String name, String property);
34  
35      int getIntProperty(String name);
36  
37      boolean getBooleanProperty(String name);
38  
39      String getStringProperty(String name);
40  
41      double getDoubleProperty(String name);
42  
43      Properties getProperties();
44  
45      boolean include();
46  
47      void setInclude(boolean include);
48  
49      int getPriority();
50  
51      String getPriorityName();
52  
53      void setPriority(int priority);
54  }