net.sourceforge.pmd
public class RuleSet extends Object
See Also: Rule
Method Summary | |
---|---|
void | addExcludePattern(String excludePattern) |
void | addExcludePatterns(List<String> excludePatterns) |
void | addIncludePattern(String includePattern) |
void | addIncludePatterns(List<String> includePatterns) |
void | addRule(Rule rule)
Add a new rule to this ruleset
|
void | addRuleByReference(String ruleSetFileName, Rule rule)
Add a new rule by reference to this ruleset.
|
void | addRuleSet(RuleSet ruleSet)
Add a whole RuleSet to this RuleSet
|
void | addRuleSetByReference(RuleSet ruleSet, boolean allRules)
Add all rules by reference from one RuleSet to this RuleSet. |
boolean | applies(File file)
Check if a given source file should be checked by rules in this RuleSet. |
void | apply(List acuList, RuleContext ctx) |
void | end(RuleContext ctx) |
boolean | equals(Object o) |
String | getDescription() |
List<String> | getExcludePatterns() |
String | getFileName() |
List<String> | getIncludePatterns() |
Language | getLanguage() |
String | getName() |
Rule | getRuleByName(String ruleName)
Returns the Rule with the given name
|
Collection<Rule> | getRules()
Returns the actual Collection of rules in this ruleset
|
int | hashCode() |
void | setDescription(String description) |
void | setExcludePatterns(List<String> excludePatterns) |
void | setFileName(String fileName) |
void | setIncludePatterns(List<String> includePatterns) |
void | setLanguage(Language language) |
void | setName(String name) |
int | size()
Returns the number of rules in this ruleset
|
void | start(RuleContext ctx) |
boolean | usesDFA() |
boolean | usesTypeResolution() |
Parameters: rule the rule to be added
Parameters: ruleSetFileName the ruleset which contains the rule rule the rule to be added
Parameters: ruleSet the RuleSet to add
Parameters: ruleSet the RuleSet to add allRules
exclude
pattern which matches
the file, unless there is an include
pattern which also matches
the file. In other words, include
patterns override exclude
patterns.
Parameters: file the source file to check
Returns: true
if the file should be checked, false
otherwise
See Also: java.lang.Object#equals(java.lang.Object)
Parameters: ruleName the name of the rule to find
Returns: the rule or null if not found
Returns: a Collection with the rules. All objects are of type Rule
See Also: java.lang.Object#hashCode()
Returns: an int representing the number of rules
Returns: true if any rule in the RuleSet needs the DFA layer