Class DefaultActiveRules
- java.lang.Object
-
- org.sonar.api.batch.rule.internal.DefaultActiveRules
-
- All Implemented Interfaces:
ActiveRules
@Immutable public class DefaultActiveRules extends java.lang.Object implements ActiveRules
-
-
Constructor Summary
Constructors Constructor Description DefaultActiveRules(java.util.Collection<NewActiveRule> newActiveRules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiveRule
find(RuleKey ruleKey)
Find aActiveRule
by the associated rule key.java.util.Collection<ActiveRule>
findAll()
All the active rules, whatever their repository and related language.ActiveRule
findByInternalKey(java.lang.String repository, java.lang.String internalKey)
Find aActiveRule
by the associated internal key.java.util.Collection<ActiveRule>
findByLanguage(java.lang.String language)
The active rules for a given language, likejava
java.util.Collection<ActiveRule>
findByRepository(java.lang.String repository)
The active rules for a given repository, likefindbugs
-
-
-
Constructor Detail
-
DefaultActiveRules
public DefaultActiveRules(java.util.Collection<NewActiveRule> newActiveRules)
-
-
Method Detail
-
find
public ActiveRule find(RuleKey ruleKey)
Description copied from interface:ActiveRules
Find aActiveRule
by the associated rule key.null
is returned if the rule does not exist or if the rule is not activated on any Quality profile associated with the project.- Specified by:
find
in interfaceActiveRules
-
findAll
public java.util.Collection<ActiveRule> findAll()
Description copied from interface:ActiveRules
All the active rules, whatever their repository and related language.- Specified by:
findAll
in interfaceActiveRules
-
findByRepository
public java.util.Collection<ActiveRule> findByRepository(java.lang.String repository)
Description copied from interface:ActiveRules
The active rules for a given repository, likefindbugs
- Specified by:
findByRepository
in interfaceActiveRules
-
findByLanguage
public java.util.Collection<ActiveRule> findByLanguage(java.lang.String language)
Description copied from interface:ActiveRules
The active rules for a given language, likejava
- Specified by:
findByLanguage
in interfaceActiveRules
-
findByInternalKey
public ActiveRule findByInternalKey(java.lang.String repository, java.lang.String internalKey)
Description copied from interface:ActiveRules
Find aActiveRule
by the associated internal key.null
is returned if the rule does not exist or if the rule is not activated on any Quality profile associated with the project.- Specified by:
findByInternalKey
in interfaceActiveRules
-
-