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.LinkedHashSet;
7   import java.util.Set;
8   
9   /**
10   * This class represents a reference to RuleSet.
11   */
12  public class RuleSetReference {
13  	private String ruleSetFileName;
14  	private boolean allRules;
15  	private Set<String> excludes = new LinkedHashSet<String>(0);
16  
17  	public RuleSetReference() {	}
18  	
19  	public RuleSetReference(String theFilename) {
20  		ruleSetFileName = theFilename;
21  	}
22  	
23  	public String getRuleSetFileName() {
24  		return ruleSetFileName;
25  	}
26  
27  	public void setRuleSetFileName(String ruleSetFileName) {
28  		this.ruleSetFileName = ruleSetFileName;
29  	}
30  
31  	public boolean isAllRules() {
32  		return allRules;
33  	}
34  
35  	public void setAllRules(boolean allRules) {
36  		this.allRules = allRules;
37  	}
38  
39  	public Set<String> getExcludes() {
40  		return excludes;
41  	}
42  
43  	public void setExcludes(Set<String> excludes) {
44  		this.excludes = excludes;
45  	}
46  
47  	public void addExclude(String name) {
48  		this.excludes.add(name);
49  	}
50  }