|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.RuleSets
public class RuleSets
Grouping of Rules per Language in a RuleSet.
Constructor Summary | |
---|---|
RuleSets()
Public constructor. |
|
RuleSets(RuleSet ruleSet)
Public constructor. |
Method Summary | |
---|---|
void |
addRuleSet(RuleSet ruleSet)
Add a ruleset for a language. |
boolean |
applies(java.io.File file)
Check if a given source file should be checked by rules in this RuleSets. |
void |
apply(java.util.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. |
java.util.Set<Rule> |
getAllRules()
Return all rules from all rulesets. |
RuleSet[] |
getAllRuleSets()
Get all the RuleSets. |
Rule |
getRuleByName(java.lang.String ruleName)
Returns the first Rule found with the given name. |
java.util.Iterator<RuleSet> |
getRuleSetsIterator()
|
void |
removeDysfunctionalRules(java.util.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleSets()
public RuleSets(RuleSet ruleSet)
ruleSet
- the RuleSetMethod Detail |
---|
public void addRuleSet(RuleSet ruleSet)
ruleSet
- the RuleSetpublic RuleSet[] getAllRuleSets()
public java.util.Iterator<RuleSet> getRuleSetsIterator()
public java.util.Set<Rule> getAllRules()
public boolean applies(java.io.File file)
file
- the source file to check
true
if the file should be checked, false
otherwisepublic void start(RuleContext ctx)
public void apply(java.util.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 source
public Rule getRuleByName(java.lang.String ruleName)
ruleName
- the exact name of the rule to find
public int ruleCount()
public boolean usesTypeResolution(Language language)
public void removeDysfunctionalRules(java.util.Collection<Rule> collector)
collector
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |