net.sourceforge.pmd
Class RuleSet

java.lang.Object
  extended by net.sourceforge.pmd.RuleSet

public class RuleSet
extends java.lang.Object

This class represents a collection of rules.

See Also:
Rule

Constructor Summary
RuleSet()
           
 
Method Summary
 void addRule(Rule rule)
          Add a new rule to this ruleset
 void addRuleSet(RuleSet ruleSet)
          Add a whole RuleSet to this RuleSet
 void apply(java.util.List acuList, RuleContext ctx)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getDescription()
           
 Language getLanguage()
           
 java.lang.String getName()
           
 Rule getRuleByName(java.lang.String ruleName)
          Returns the Rule with the given name
 java.util.Collection<Rule> getRules()
          Returns the actual Collection of rules in this ruleset
 int hashCode()
           
 void setDescription(java.lang.String description)
           
 void setLanguage(Language language)
           
 void setName(java.lang.String name)
           
 int size()
          Returns the number of rules in this ruleset
 boolean usesDFA()
           
 boolean usesTypeResolution()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleSet

public RuleSet()
Method Detail

size

public int size()
Returns the number of rules in this ruleset

Returns:
an int representing the number of rules

addRule

public void addRule(Rule rule)
Add a new rule to this ruleset

Parameters:
rule - the rule to be added

getRules

public java.util.Collection<Rule> getRules()
Returns the actual Collection of rules in this ruleset

Returns:
a Collection with the rules. All objects are of type Rule

usesDFA

public boolean usesDFA()
Returns:
true if any rule in the RuleSet needs the DFA layer

getRuleByName

public Rule getRuleByName(java.lang.String ruleName)
Returns the Rule with the given name

Parameters:
ruleName - the name of the rule to find
Returns:
the rule or null if not found

addRuleSet

public void addRuleSet(RuleSet ruleSet)
Add a whole RuleSet to this RuleSet

Parameters:
ruleSet - the RuleSet to add

apply

public void apply(java.util.List acuList,
                  RuleContext ctx)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

getLanguage

public Language getLanguage()

setLanguage

public void setLanguage(Language language)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

usesTypeResolution

public boolean usesTypeResolution()