org.sonar.api.batch.sensor.issue.internal
Class DefaultIssueBuilder

java.lang.Object
  extended by org.sonar.api.batch.sensor.issue.internal.DefaultIssueBuilder
All Implemented Interfaces:
IssueBuilder

public class DefaultIssueBuilder
extends Object
implements IssueBuilder


Constructor Summary
DefaultIssueBuilder()
           
 
Method Summary
 DefaultIssueBuilder atLine(int line)
          Line of the issue.
 DefaultIssue build()
          Build the issue.
 DefaultIssueBuilder effortToFix(Double effortToFix)
          Effort to fix the issue.
 DefaultIssueBuilder message(String message)
          Message of the issue.
 DefaultIssueBuilder onDir(InputDir dir)
          The InputDir the issue belongs to.
 DefaultIssueBuilder onFile(InputFile file)
          The InputFile the issue belongs to.
 DefaultIssueBuilder onProject()
          Tell that the issue is global to the project.
 DefaultIssueBuilder ruleKey(RuleKey ruleKey)
          The RuleKey of the issue.
 IssueBuilder severity(String severity)
          Severity of the issue.
 DefaultIssueBuilder withKey(String key)
          For testing only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIssueBuilder

public DefaultIssueBuilder()
Method Detail

ruleKey

public DefaultIssueBuilder ruleKey(RuleKey ruleKey)
Description copied from interface: IssueBuilder
The RuleKey of the issue.

Specified by:
ruleKey in interface IssueBuilder

onFile

public DefaultIssueBuilder onFile(InputFile file)
Description copied from interface: IssueBuilder
The InputFile the issue belongs to. For global issues call IssueBuilder.onProject().

Specified by:
onFile in interface IssueBuilder

onDir

public DefaultIssueBuilder onDir(InputDir dir)
Description copied from interface: IssueBuilder
The InputDir the issue belongs to. For global issues call IssueBuilder.onProject().

Specified by:
onDir in interface IssueBuilder

onProject

public DefaultIssueBuilder onProject()
Description copied from interface: IssueBuilder
Tell that the issue is global to the project.

Specified by:
onProject in interface IssueBuilder

atLine

public DefaultIssueBuilder atLine(int line)
Description copied from interface: IssueBuilder
Line of the issue. Only available for IssueBuilder.onFile(InputFile) issues. If no line is specified it means that issue is global to the file.

Specified by:
atLine in interface IssueBuilder

effortToFix

public DefaultIssueBuilder effortToFix(@Nullable
                                       Double effortToFix)
Description copied from interface: IssueBuilder
Effort to fix the issue.

Specified by:
effortToFix in interface IssueBuilder

message

public DefaultIssueBuilder message(String message)
Description copied from interface: IssueBuilder
Message of the issue.

Specified by:
message in interface IssueBuilder

severity

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

Specified by:
severity in interface IssueBuilder

withKey

public DefaultIssueBuilder withKey(String key)
For testing only.


build

public DefaultIssue build()
Description copied from interface: IssueBuilder
Build the issue. After call of this method the builder is cleaned and can be used to build another issue.

Specified by:
build in interface IssueBuilder


Copyright © 2009–2015 SonarSource. All rights reserved.