net.sourceforge.pmd
public class RuleSets extends Object
Constructor Summary | |
---|---|
RuleSets()
Public constructor. | |
RuleSets(RuleSet ruleSet)
Public constructor. |
Method Summary | |
---|---|
void | addRuleSet(RuleSet ruleSet)
Add a ruleset for a language. |
boolean | applies(File file)
Check if a given source file should be checked by rules in this RuleSets.
|
boolean | applies(Language languageOfSource, Language languageOfRule)
Check if a source with given language should be checked by rules for a given
language. |
void | apply(List<CompilationUnit> acuList, RuleContext ctx, Language language)
Apply all applicable rules to the compilation units.
|
void | end(RuleContext ctx)
Notify all rules of the end of processing. |
Set<Rule> | getAllRules()
Return all rules from all rulesets.
|
RuleSet[] | getAllRuleSets()
Get all the RuleSets.
|
Rule | getRuleByName(String ruleName)
Returns the Rule with the given name
|
Iterator<RuleSet> | getRuleSetsIterator() |
void | start(RuleContext ctx)
Notify all rules of the start of processing. |
boolean | usesDFA(Language language)
Check if the rules that apply to a source of the given language
use DFA.
|
boolean | usesTypeResolution(Language language) |
Parameters: ruleSet the RuleSet
Parameters: ruleSet the RuleSet
Parameters: file the source file to check
Returns: true
if the file should be checked, false
otherwise
Parameters: languageOfSource language of a source; can not be null languageOfRule language of a ruleset; can be null
Returns: boolean true if the rule applies, else false
Parameters: acuList the List of compilation units; the type these must have, depends on the source language ctx the RuleContext language the Language of the source
Returns: Set
Returns: RuleSet[]
Parameters: ruleName the name of the rule to find
Returns: the rule or null if not found
Parameters: language the language of a source
Returns: true if any rule in the RuleSet needs the DFA layer