Package net.sourceforge.pmd
Class RulesetsFactoryUtils
- java.lang.Object
-
- net.sourceforge.pmd.RulesetsFactoryUtils
-
public final class RulesetsFactoryUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuleSetFactory
getRulesetFactory(PMDConfiguration configuration, ResourceLoader resourceLoader)
static RuleSets
getRuleSets(java.lang.String rulesets, RuleSetFactory factory)
Creates a new rulesets with the given string.static RuleSets
getRuleSetsWithBenchmark(java.lang.String rulesets, RuleSetFactory factory)
-
-
-
Method Detail
-
getRuleSets
public static RuleSets getRuleSets(java.lang.String rulesets, RuleSetFactory factory)
Creates a new rulesets with the given string. The resulting rulesets will contain all referenced rulesets.- Parameters:
rulesets
- the string with the rulesets to loadfactory
- the ruleset factory- Returns:
- the rulesets
- Throws:
java.lang.IllegalArgumentException
- if rulesets is empty (means, no rules have been found) or if a ruleset couldn't be found.
-
getRuleSetsWithBenchmark
public static RuleSets getRuleSetsWithBenchmark(java.lang.String rulesets, RuleSetFactory factory)
SeegetRuleSets(String, RuleSetFactory)
. In addition, the loading of the rules is benchmarked.- Parameters:
rulesets
- the string with the rulesets to loadfactory
- the ruleset factory- Returns:
- the rulesets
- Throws:
java.lang.IllegalArgumentException
- if rulesets is empty (means, no rules have been found) or if a ruleset couldn't be found.
-
getRulesetFactory
public static RuleSetFactory getRulesetFactory(PMDConfiguration configuration, ResourceLoader resourceLoader)
-
-