public class RuleSets extends Object
Constructor and Description |
---|
RuleSets()
Public constructor.
|
RuleSets(RuleSet ruleSet)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
apply(List<Node> 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 first Rule found with the given name.
|
Iterator<RuleSet> |
getRuleSetsIterator() |
void |
removeDysfunctionalRules(Collection<Rule> collector)
Remove and collect any rules that report problems.
|
int |
ruleCount()
Determines the total count of rules that are used in all rule sets.
|
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) |
public RuleSets()
public RuleSets(RuleSet ruleSet)
ruleSet
- the RuleSetpublic void addRuleSet(RuleSet ruleSet)
ruleSet
- the RuleSetpublic RuleSet[] getAllRuleSets()
public boolean applies(File file)
file
- the source file to checktrue
if the file should be checked, false
otherwisepublic void start(RuleContext ctx)
public void apply(List<Node> acuList, RuleContext ctx, Language language)
acuList
- the List of compilation units; the type these must have,
depends on the source languagectx
- the RuleContextlanguage
- the Language of the sourcepublic void end(RuleContext ctx)
public boolean usesDFA(Language language)
language
- the language of a sourcepublic Rule getRuleByName(String ruleName)
ruleName
- the exact name of the rule to findpublic int ruleCount()
public boolean usesTypeResolution(Language language)
public void removeDysfunctionalRules(Collection<Rule> collector)
collector
- Copyright © 2002–2017 PMD. All rights reserved.