|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.RuleSetFactory
public class RuleSetFactory
RuleSetFactory is responsible for creating RuleSet instances from XML content.
Constructor Summary | |
---|---|
RuleSetFactory()
|
Method Summary | |
---|---|
RuleSet |
createRuleSet(java.io.InputStream inputStream)
Create a RuleSet from an InputStream. |
RuleSet |
createRuleSet(java.io.InputStream inputStream,
java.lang.ClassLoader classLoader)
Create a RuleSet from an InputStream with a specified ClassLoader. |
RuleSet |
createRuleSet(java.lang.String name,
java.lang.ClassLoader classLoader)
Deprecated. Use createRuleSets instead, because this method puts all rules in one single RuleSet object, and thus removes name and language of the originating rule set files. |
RuleSets |
createRuleSets(java.lang.String ruleSetFileNames)
Create a RuleSets from a list of names. |
RuleSets |
createRuleSets(java.lang.String ruleSetFileNames,
java.lang.ClassLoader classLoader)
Create a RuleSets from a list of names with a specified ClassLoader. |
RuleSet |
createSingleRuleSet(java.lang.String ruleSetFileName)
Create a RuleSet from a file name resource. |
java.util.Iterator<RuleSet> |
getRegisteredRuleSets()
Returns an Iterator of RuleSet objects loaded from descriptions from the "rulesets.properties" resource. |
void |
setMinimumPriority(int minPriority)
Set the minimum rule priority threshold for all Rules which are loaded from RuleSets via reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleSetFactory()
Method Detail |
---|
public void setMinimumPriority(int minPriority)
minPriority
- The minimum priority.public java.util.Iterator<RuleSet> getRegisteredRuleSets() throws RuleSetNotFoundException
RuleSetNotFoundException
public RuleSets createRuleSets(java.lang.String ruleSetFileNames) throws RuleSetNotFoundException
ruleSetFileNames
- A comma-separated list of rule set files.
RuleSetNotFoundException
- if unable to find a resource.public RuleSets createRuleSets(java.lang.String ruleSetFileNames, java.lang.ClassLoader classLoader) throws RuleSetNotFoundException
ruleSetFileNames
- A comma-separated list of rule set files.classLoader
- The ClassLoader to load Classes and resources.
RuleSetNotFoundException
- if unable to find a resource.public RuleSet createRuleSet(java.lang.String name, java.lang.ClassLoader classLoader) throws RuleSetNotFoundException
name
- name of rule set file loaded as a resourceclassLoader
- the classloader used to load the ruleset and subsequent rules
RuleSetNotFoundException
public RuleSet createSingleRuleSet(java.lang.String ruleSetFileName) throws RuleSetNotFoundException
ruleSetFileName
- The name of rule set file loaded as a resource.
RuleSetNotFoundException
- if unable to find a resource.public RuleSet createRuleSet(java.io.InputStream inputStream)
inputStream
- InputStream containing the RuleSet XML configuration.
public RuleSet createRuleSet(java.io.InputStream inputStream, java.lang.ClassLoader classLoader)
inputStream
- InputStream containing the RuleSet XML configuration.classLoader
- The ClassLoader to load Classes and resources.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |