View Javadoc

1   package net.sourceforge.pmd;
2   
3   import java.util.List;
4   import java.util.Properties;
5   
6   /**
7    * Base class for Rule implementations which delegate to another Rule instance.
8    */
9   public class AbstractDelegateRule implements Rule {
10  	private Rule rule;
11  
12  	public AbstractDelegateRule() {
13  	}
14  
15  	public void setRule(Rule rule) {
16  		this.rule = rule;
17  	}
18  
19  	public Rule getRule() {
20  		return rule;
21  	}
22  
23  	public String getName() {
24  		return rule.getName();
25  	}
26  
27  	public void setName(String name) {
28  		rule.setName(name);
29  	}
30  
31  	public String getSince() {
32  		return rule.getSince();
33  	}
34  
35  	public void setSince(String since) {
36  		rule.setSince(since);
37  	}
38  
39  	public String getRuleClass() {
40  		return rule.getRuleClass();
41  	}
42  
43  	public void setRuleClass(String ruleClass) {
44  		rule.setRuleClass(ruleClass);
45  	}
46  
47  	public String getRuleSetName() {
48  		return rule.getRuleSetName();
49  	}
50  
51  	public void setRuleSetName(String name) {
52  		rule.setRuleSetName(name);
53  	}
54  
55  	public String getMessage() {
56  		return rule.getMessage();
57  	}
58  
59  	public void setMessage(String message) {
60  		rule.setMessage(message);
61  	}
62  
63  	public String getDescription() {
64  		return rule.getDescription();
65  	}
66  
67  	public void setDescription(String description) {
68  		rule.setDescription(description);
69  	}
70  
71  	public List<String> getExamples() {
72  		return rule.getExamples();
73  	}
74  
75  	public String getExample() {
76  		return rule.getExample();
77  	}
78  
79  	public void addExample(String example) {
80  		rule.addExample(example);
81  	}
82  
83  	public String getExternalInfoUrl() {
84  		return rule.getExternalInfoUrl();
85  	}
86  
87  	public void setExternalInfoUrl(String url) {
88  		rule.setExternalInfoUrl(url);
89  	}
90  
91  	public int getPriority() {
92  		return rule.getPriority();
93  	}
94  
95  	public void setPriority(int priority) {
96  		rule.setPriority(priority);
97  	}
98  
99  	public String getPriorityName() {
100 		return rule.getPriorityName();
101 	}
102 
103 	public boolean include() {
104 		return rule.include();
105 	}
106 
107 	public void setInclude(boolean include) {
108 		rule.setInclude(include);
109 	}
110 
111 	public Properties getProperties() {
112 		return rule.getProperties();
113 	}
114 
115 	public void addProperty(String name, String property) {
116 		rule.addProperty(name, property);
117 	}
118 
119 	public void addProperties(Properties properties) {
120 		rule.addProperties(properties);
121 	}
122 
123 	public boolean hasProperty(String name) {
124 		return rule.hasProperty(name);
125 	}
126 
127 	public boolean getBooleanProperty(String name) {
128 		return rule.getBooleanProperty(name);
129 	}
130 
131 	public int getIntProperty(String name) {
132 		return rule.getIntProperty(name);
133 	}
134 
135 	public double getDoubleProperty(String name) {
136 		return rule.getDoubleProperty(name);
137 	}
138 
139 	public String getStringProperty(String name) {
140 		return rule.getStringProperty(name);
141 	}
142 
143 	public PropertyDescriptor propertyDescriptorFor(String name) {
144 		return rule.propertyDescriptorFor(name);
145 	}
146 
147 	public void setUsesDFA() {
148 		rule.setUsesDFA();
149 	}
150 
151 	public boolean usesDFA() {
152 		return rule.usesDFA();
153 	}
154 
155 	public void setUsesTypeResolution() {
156 		rule.setUsesTypeResolution();
157 	}
158 
159 	public boolean usesTypeResolution() {
160 		return rule.usesTypeResolution();
161 	}
162 
163 	public boolean usesRuleChain() {
164 		return rule.usesRuleChain();
165 	}
166 
167 	public List<String> getRuleChainVisits() {
168 		return rule.getRuleChainVisits();
169 	}
170 
171 	public void addRuleChainVisit(String astNodeName) {
172 		rule.addRuleChainVisit(astNodeName);
173 	}
174 
175 	public void start(RuleContext ctx) {
176 		rule.start(ctx);
177 	}
178 
179 	public void apply(List astCompilationUnits, RuleContext ctx) {
180 		rule.apply(astCompilationUnits, ctx);
181 	}
182 
183 	public void end(RuleContext ctx) {
184 		rule.end(ctx);
185 	}
186 }