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

java.lang.Object
  extended by org.sonar.api.batch.rule.internal.DefaultActiveRule
All Implemented Interfaces:
ActiveRule

@Immutable
public class DefaultActiveRule
extends Object
implements ActiveRule


Method Summary
 String internalKey()
          Optional key declared and used by the underlying rule engine.
 String language()
          Language of rule, for example java
 String name()
           
 String param(String key)
          Value of given parameter.
 Map<String,String> params()
          Immutable parameter values.
 RuleKey ruleKey()
           
 String severity()
          Non-null severity.
 String templateRuleKey()
          Optional rule key of the template rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ruleKey

public RuleKey ruleKey()
Specified by:
ruleKey in interface ActiveRule

name

public String name()

severity

public String severity()
Description copied from interface: ActiveRule
Non-null severity.

Specified by:
severity in interface ActiveRule
See Also:
Severity

language

public String language()
Description copied from interface: ActiveRule
Language of rule, for example java

Specified by:
language in interface ActiveRule

param

public String param(String key)
Description copied from interface: ActiveRule
Value of given parameter. Returns null if the parameter key does not exist on the rule or if the parameter has no value nor default value.

Specified by:
param in interface ActiveRule

params

public Map<String,String> params()
Description copied from interface: ActiveRule
Immutable parameter values. Returns an empty map if no parameters are defined.

Specified by:
params in interface ActiveRule

internalKey

public String internalKey()
Description copied from interface: ActiveRule
Optional key declared and used by the underlying rule engine. As an example the key of a Checkstyle rule looks like com.puppycrawl.tools.checkstyle.checks.FooCheck whereas its internal key can be Checker/TreeWalker/Foo.

Specified by:
internalKey in interface ActiveRule

templateRuleKey

public String templateRuleKey()
Description copied from interface: ActiveRule
Optional rule key of the template rule.

Specified by:
templateRuleKey in interface ActiveRule


Copyright © 2009–2015 SonarSource. All rights reserved.