net.sourceforge.pmd
Class RuleSet

java.lang.Object
  extended bynet.sourceforge.pmd.RuleSet

public class RuleSet
extends java.lang.Object


Field Summary
private  java.lang.String description
           
private  java.lang.String m_fileName
          The name of the file the rule set is stored in, e.g., "basic_rules.xml".
private  boolean m_include
          Indicates whether or not the rule set should be included in PMD's analysis.
private  java.lang.String name
           
private  java.util.Set rules
           
 
Constructor Summary
RuleSet()
           
 
Method Summary
 void addRule(Rule rule)
           
 void addRuleSet(RuleSet ruleSet)
           
 void apply(java.util.List acuList, RuleContext ctx)
           
 java.lang.String getDescription()
           
 java.lang.String getFileName()
          Get the name of the file the rule set is to be stored in, e.g., "basic_rules.xml".
 java.lang.String getName()
           
 Rule getRuleByName(java.lang.String ruleName)
           
 java.util.Set getRules()
           
 boolean include()
          Returns true when the rule set is included in PMD's analysis; otherwise, false when it is excluded.
 void setDescription(java.lang.String description)
           
 void setFileName(java.lang.String fileName)
          Set the name of the file the rule set is to be stored in, e.g., "basic_rules.xml".
 void setInclude(boolean include)
          Set to true when the rule set is included in PMD's analysis; otherwise, set to false when it is excluded.
 void setName(java.lang.String name)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rules

private java.util.Set rules

name

private java.lang.String name

description

private java.lang.String description

m_include

private boolean m_include
Indicates whether or not the rule set should be included in PMD's analysis. True to include the rule set; otherwise, false to exclude the rule set.


m_fileName

private java.lang.String m_fileName
The name of the file the rule set is stored in, e.g., "basic_rules.xml". The user may change the rule set name; therefore, the rule set name cannot be used for a file name. This variable is set when the rule set is read.

Constructor Detail

RuleSet

public RuleSet()
Method Detail

size

public int size()

addRule

public void addRule(Rule rule)

getRules

public java.util.Set getRules()

getRuleByName

public Rule getRuleByName(java.lang.String ruleName)

addRuleSet

public void addRuleSet(RuleSet ruleSet)

apply

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

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)

include

public boolean include()
Returns true when the rule set is included in PMD's analysis; otherwise, false when it is excluded.

Returns:
True to include during analysis.

setInclude

public void setInclude(boolean include)
Set to true when the rule set is included in PMD's analysis; otherwise, set to false when it is excluded.

Parameters:
include - True to include during analysis.

getFileName

public java.lang.String getFileName()
Get the name of the file the rule set is to be stored in, e.g., "basic_rules.xml".

Returns:
The name of the rule set file.

setFileName

public void setFileName(java.lang.String fileName)
Set the name of the file the rule set is to be stored in, e.g., "basic_rules.xml".

Parameters:
fileName - The name of the rule set file.