public static class RuleDefinitions.NewRepositoryImpl extends Object implements RuleDefinitions.NewRepository
Modifier and Type | Method and Description |
---|---|
void |
done() |
RuleDefinitions.NewRule |
loadAnnotatedClass(Class clazz)
Reads definition of rule from the annotations provided by the library sonar-check-api.
|
RuleDefinitions.NewRepositoryImpl |
loadAnnotatedClasses(Class... classes)
Reads definitions of rules from the annotations provided by the library sonar-check-api.
|
RuleDefinitions.NewRepositoryImpl |
loadXml(InputStream xmlInput,
String encoding)
Reads definitions of rules from a XML file.
|
RuleDefinitions.NewRule |
newRule(String ruleKey) |
RuleDefinitions.NewRule |
rule(String ruleKey) |
RuleDefinitions.NewRepositoryImpl |
setName(String s) |
public RuleDefinitions.NewRepositoryImpl setName(@Nullable String s)
setName
in interface RuleDefinitions.NewRepository
public RuleDefinitions.NewRule newRule(String ruleKey)
newRule
in interface RuleDefinitions.NewExtendedRepository
@CheckForNull public RuleDefinitions.NewRule rule(String ruleKey)
rule
in interface RuleDefinitions.NewRepository
public RuleDefinitions.NewRepositoryImpl loadAnnotatedClasses(Class... classes)
RuleDefinitions.NewExtendedRepository
loadAnnotatedClasses
in interface RuleDefinitions.NewExtendedRepository
public RuleDefinitions.NewRule loadAnnotatedClass(Class clazz)
RuleDefinitions.NewExtendedRepository
loadAnnotatedClass
in interface RuleDefinitions.NewExtendedRepository
public RuleDefinitions.NewRepositoryImpl loadXml(InputStream xmlInput, String encoding)
RuleDefinitions.NewExtendedRepository
<rules> <rule> <!-- required fields --> <key>the-rule-key</key> <name>The purpose of the rule</name> <description> <![CDATA[The description]]> </description> <!-- optional fields --> <internalKey>Checker/TreeWalker/LocalVariableName</internalKey> <severity>BLOCKER</severity> <cardinality>MULTIPLE</cardinality> <status>BETA</status> <param> <key>the-param-key</key> <tag>style</tag> <tag>security</tag> <description> <![CDATA[ the param-description ]]> </description> <defaultValue>42</defaultValue> </param> <param> <key>another-param</key> </param> <!-- deprecated fields --> <configKey>Checker/TreeWalker/LocalVariableName</configKey> <priority>BLOCKER</priority> </rule> </rules>
loadXml
in interface RuleDefinitions.NewExtendedRepository
public void done()
done
in interface RuleDefinitions.NewExtendedRepository
Copyright © 2009-2014 SonarSource. All Rights Reserved.