Class DefaultActiveRule
- java.lang.Object
-
- org.sonar.api.batch.rule.internal.DefaultActiveRule
-
- All Implemented Interfaces:
ActiveRule
@Immutable public class DefaultActiveRule extends java.lang.Object implements ActiveRule
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
createdAt()
java.lang.String
internalKey()
Optional key declared and used by the underlying rule engine.java.lang.String
language()
Language of rule, for examplejava
java.lang.String
param(java.lang.String key)
Value of given parameter.java.util.Map<java.lang.String,java.lang.String>
params()
Immutable parameter values.java.lang.String
qpKey()
Key of the quality profile the rule belongs to.RuleKey
ruleKey()
java.lang.String
severity()
Non-null severity.java.lang.String
templateRuleKey()
Optional rule key of the template rule.long
updatedAt()
-
-
-
Method Detail
-
ruleKey
public RuleKey ruleKey()
- Specified by:
ruleKey
in interfaceActiveRule
-
severity
public java.lang.String severity()
Description copied from interface:ActiveRule
Non-null severity.- Specified by:
severity
in interfaceActiveRule
- See Also:
Severity
-
language
public java.lang.String language()
Description copied from interface:ActiveRule
Language of rule, for examplejava
- Specified by:
language
in interfaceActiveRule
-
param
public java.lang.String param(java.lang.String key)
Description copied from interface:ActiveRule
Value of given parameter. Returnsnull
if the parameter key does not exist on the rule or if the parameter has no value nor default value.- Specified by:
param
in interfaceActiveRule
-
params
public java.util.Map<java.lang.String,java.lang.String> params()
Description copied from interface:ActiveRule
Immutable parameter values. Returns an empty map if no parameters are defined.- Specified by:
params
in interfaceActiveRule
-
internalKey
public java.lang.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 likecom.puppycrawl.tools.checkstyle.checks.FooCheck
whereas its internal key can beChecker/TreeWalker/Foo
.- Specified by:
internalKey
in interfaceActiveRule
-
templateRuleKey
public java.lang.String templateRuleKey()
Description copied from interface:ActiveRule
Optional rule key of the template rule.- Specified by:
templateRuleKey
in interfaceActiveRule
-
createdAt
public long createdAt()
-
updatedAt
public long updatedAt()
-
qpKey
public java.lang.String qpKey()
Description copied from interface:ActiveRule
Key of the quality profile the rule belongs to.- Specified by:
qpKey
in interfaceActiveRule
-
-