Class DefaultAdHocRule
- java.lang.Object
-
- org.sonar.api.batch.sensor.internal.DefaultStorable
-
- org.sonar.api.batch.sensor.rule.internal.DefaultAdHocRule
-
- All Implemented Interfaces:
AdHocRule,NewAdHocRule
public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewAdHocRule
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
-
-
Constructor Summary
Constructors Constructor Description DefaultAdHocRule()DefaultAdHocRule(SensorStorage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescription()Description of the rule.DefaultAdHocRuledescription(java.lang.String description)The description of the rule.voiddoSave()java.lang.StringengineId()Unique identifier of the external analyzer (e.g.DefaultAdHocRuleengineId(java.lang.String engineId)Unique identifier of the external analyzer (e.g.java.lang.Stringname()Name of the rule.DefaultAdHocRulename(java.lang.String name)The name of the rule.java.lang.StringruleId()Unique rule identifier for a givenAdHocRule.engineId()DefaultAdHocRuleruleId(java.lang.String ruleId)Unique rule identifier for a givenNewAdHocRule.engineId(String)Severityseverity()Default severity of the rule.DefaultAdHocRuleseverity(Severity severity)Set the severity of the rule.RuleTypetype()Type of the rule.DefaultAdHocRuletype(RuleType type)Type of the rule.-
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.batch.sensor.rule.NewAdHocRule
save
-
-
-
-
Constructor Detail
-
DefaultAdHocRule
public DefaultAdHocRule()
-
DefaultAdHocRule
public DefaultAdHocRule(@Nullable SensorStorage storage)
-
-
Method Detail
-
severity
public DefaultAdHocRule severity(Severity severity)
Description copied from interface:NewAdHocRuleSet the severity of the rule.- Specified by:
severityin interfaceNewAdHocRule
-
engineId
public java.lang.String engineId()
Description copied from interface:AdHocRuleUnique identifier of the external analyzer (e.g. eslint, pmd, ...)
-
ruleId
public java.lang.String ruleId()
Description copied from interface:AdHocRuleUnique rule identifier for a givenAdHocRule.engineId()
-
name
public java.lang.String name()
Description copied from interface:AdHocRuleName of the rule.
-
description
@CheckForNull public java.lang.String description()
Description copied from interface:AdHocRuleDescription of the rule.- Specified by:
descriptionin interfaceAdHocRule
-
severity
public Severity severity()
Description copied from interface:AdHocRuleDefault severity of the rule.
-
doSave
public void doSave()
- Specified by:
doSavein classDefaultStorable
-
engineId
public DefaultAdHocRule engineId(java.lang.String engineId)
Description copied from interface:NewAdHocRuleUnique identifier of the external analyzer (e.g. eslint, pmd, ...)- Specified by:
engineIdin interfaceNewAdHocRule
-
ruleId
public DefaultAdHocRule ruleId(java.lang.String ruleId)
Description copied from interface:NewAdHocRuleUnique rule identifier for a givenNewAdHocRule.engineId(String)- Specified by:
ruleIdin interfaceNewAdHocRule
-
name
public DefaultAdHocRule name(java.lang.String name)
Description copied from interface:NewAdHocRuleThe name of the rule.- Specified by:
namein interfaceNewAdHocRule
-
description
public DefaultAdHocRule description(@Nullable java.lang.String description)
Description copied from interface:NewAdHocRuleThe description of the rule.- Specified by:
descriptionin interfaceNewAdHocRule
-
type
public DefaultAdHocRule type(RuleType type)
Description copied from interface:NewAdHocRuleType of the rule.- Specified by:
typein interfaceNewAdHocRule
-
-