org.sonar.api.batch.rule.internal
Class DefaultActiveRules

java.lang.Object
  extended by org.sonar.api.batch.rule.internal.DefaultActiveRules
All Implemented Interfaces:
ActiveRules, BatchComponent

@Immutable
public class DefaultActiveRules
extends Object
implements ActiveRules


Constructor Summary
DefaultActiveRules(Collection<NewActiveRule> newActiveRules)
           
 
Method Summary
 ActiveRule find(RuleKey ruleKey)
          Find a ActiveRule by the associated rule key.
 Collection<ActiveRule> findAll()
          All the active rules, whatever their repository and related language.
 ActiveRule findByInternalKey(String repository, String internalKey)
          Find a ActiveRule by the associated internal key.
 Collection<ActiveRule> findByLanguage(String language)
          The active rules for a given language, like java
 Collection<ActiveRule> findByRepository(String repository)
          The active rules for a given repository, like findbugs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultActiveRules

public DefaultActiveRules(Collection<NewActiveRule> newActiveRules)
Method Detail

find

public ActiveRule find(RuleKey ruleKey)
Description copied from interface: ActiveRules
Find a ActiveRule 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 module.

Specified by:
find in interface ActiveRules

findAll

public Collection<ActiveRule> findAll()
Description copied from interface: ActiveRules
All the active rules, whatever their repository and related language.

Specified by:
findAll in interface ActiveRules

findByRepository

public Collection<ActiveRule> findByRepository(String repository)
Description copied from interface: ActiveRules
The active rules for a given repository, like findbugs

Specified by:
findByRepository in interface ActiveRules

findByLanguage

public Collection<ActiveRule> findByLanguage(String language)
Description copied from interface: ActiveRules
The active rules for a given language, like java

Specified by:
findByLanguage in interface ActiveRules

findByInternalKey

public ActiveRule findByInternalKey(String repository,
                                    String internalKey)
Description copied from interface: ActiveRules
Find a ActiveRule 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 module.

Specified by:
findByInternalKey in interface ActiveRules


Copyright © 2009–2014 SonarSource. All rights reserved.