| java.lang.Object net.sourceforge.pmd.RuleSets
RuleSets | public class RuleSets (Code) | | Grouping of Rules per Language in a RuleSet.
author: pieter_van_raemdonck - Application Engineers NV/SA - www.ae.be |
RuleSets | public RuleSets()(Code) | | Public constructor.
|
RuleSets | public RuleSets(RuleSet ruleSet)(Code) | | Public constructor. Add the given rule set.
Parameters: ruleSet - the RuleSet |
addRuleSet | public void addRuleSet(RuleSet ruleSet)(Code) | | Add a ruleset for a language. Only one ruleset can be added for a specific
language. If ruleSet.getLanguage() is null, it is assumed to be a RuleSet of java
rules.
Parameters: ruleSet - the RuleSet |
applies | public boolean applies(File file)(Code) | | Check if a given source file should be checked by rules in this RuleSets.
Parameters: file - the source file to check true if the file should be checked, false otherwise |
applies | public boolean applies(Language languageOfSource, Language languageOfRule)(Code) | | Check if a source with given language should be checked by rules for a given
language. This is the case if both languages are equal, or if the source is in
java, and the language of the rules is unknown (for backward-compatibility
reasons).
Parameters: languageOfSource - language of a source; can not be null Parameters: languageOfRule - language of a ruleset; can be null boolean true if the rule applies, else false |
apply | public void apply(List<CompilationUnit> acuList, RuleContext ctx, Language language)(Code) | | Apply all applicable rules to the compilation units.
Applicable means the language of the rules must match the language
of the source (@see applies).
Parameters: acuList - the List of compilation units; the type these must have,depends on the source language Parameters: ctx - the RuleContext Parameters: language - the Language of the source |
getAllRuleSets | public RuleSet[] getAllRuleSets()(Code) | | Get all the RuleSets.
RuleSet[] |
getAllRules | public Set<Rule> getAllRules()(Code) | | Return all rules from all rulesets.
Set |
getRuleByName | public Rule getRuleByName(String ruleName)(Code) | | Returns the Rule with the given name
Parameters: ruleName - the name of the rule to find the rule or null if not found |
start | public void start(RuleContext ctx)(Code) | | Notify all rules of the start of processing.
|
usesDFA | public boolean usesDFA(Language language)(Code) | | Check if the rules that apply to a source of the given language
use DFA.
Parameters: language - the language of a source true if any rule in the RuleSet needs the DFA layer |
usesTypeResolution | public boolean usesTypeResolution(Language language)(Code) | | |
|
|