org.sonar.api.batch.sensor.issue
Interface IssueBuilder

All Known Implementing Classes:
DefaultIssueBuilder

@Beta
public interface IssueBuilder

Builder for Issue.

Since:
4.4

Method Summary
 IssueBuilder atLine(int line)
          Line of the issue.
 Issue build()
          Build the issue.
 IssueBuilder effortToFix(Double effortToFix)
          Effort to fix the issue.
 IssueBuilder message(String message)
          Message of the issue.
 IssueBuilder onDir(InputDir inputDir)
          The InputDir the issue belongs to.
 IssueBuilder onFile(InputFile file)
          The InputFile the issue belongs to.
 IssueBuilder onProject()
          Tell that the issue is global to the project.
 IssueBuilder ruleKey(RuleKey ruleKey)
          The RuleKey of the issue.
 IssueBuilder severity(String severity)
          Severity of the issue.
 

Method Detail

ruleKey

IssueBuilder ruleKey(RuleKey ruleKey)
The RuleKey of the issue.


onFile

IssueBuilder onFile(InputFile file)
The InputFile the issue belongs to. For global issues call onProject().


onDir

IssueBuilder onDir(InputDir inputDir)
The InputDir the issue belongs to. For global issues call onProject().


onProject

IssueBuilder onProject()
Tell that the issue is global to the project.


atLine

IssueBuilder atLine(int line)
Line of the issue. Only available for onFile(InputFile) issues. If no line is specified it means that issue is global to the file.


effortToFix

IssueBuilder effortToFix(@Nullable
                         Double effortToFix)
Effort to fix the issue.


message

IssueBuilder message(String message)
Message of the issue.


severity

IssueBuilder severity(@Nullable
                      String severity)
Severity of the issue. See Severity. Setting a null value means to use severity configured in quality profile.


build

Issue build()
Build the issue. After call of this method the builder is cleaned and can be used to build another issue.



Copyright © 2009–2015 SonarSource. All rights reserved.