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

java.lang.Object
  extended by org.sonar.api.batch.sensor.internal.DefaultStorable
      extended by org.sonar.api.batch.sensor.issue.internal.DefaultIssue
All Implemented Interfaces:
Issue

public class DefaultIssue
extends DefaultStorable
implements Issue


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.sensor.issue.Issue
Issue.Severity
 
Field Summary
 
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
 
Constructor Summary
DefaultIssue()
           
DefaultIssue(SensorStorage storage)
           
 
Method Summary
 DefaultIssue atLine(int line)
          Line of the issue.
 void doSave()
           
 Double effortToFix()
          Effort to fix the issue.
 DefaultIssue effortToFix(Double effortToFix)
          Effort to fix the issue.
 boolean equals(Object o)
           
 int hashCode()
           
 InputPath inputPath()
          The InputPath this issue belongs to.
 String key()
           
 Integer line()
          Line of the issue.
 String message()
          Message of the issue.
 DefaultIssue message(String message)
          Message of the issue.
 DefaultIssue onDir(InputDir dir)
          The InputDir the issue belongs to.
 DefaultIssue onFile(InputFile file)
          The InputFile the issue belongs to.
 DefaultIssue onProject()
          Tell that the issue is global to the project.
 Issue.Severity overridenSeverity()
          Overriden severity.
 Issue overrideSeverity(Issue.Severity severity)
          Override severity of the issue.
 RuleKey ruleKey()
          The RuleKey of this issue.
 DefaultIssue ruleKey(RuleKey ruleKey)
          The RuleKey of the issue.
 DefaultIssue withKey(String key)
          For testing only.
 
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sonar.api.batch.sensor.issue.Issue
save
 

Constructor Detail

DefaultIssue

public DefaultIssue()

DefaultIssue

public DefaultIssue(SensorStorage storage)
Method Detail

ruleKey

public DefaultIssue ruleKey(RuleKey ruleKey)
Description copied from interface: Issue
The RuleKey of the issue.

Specified by:
ruleKey in interface Issue

onFile

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

Specified by:
onFile in interface Issue

onDir

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

Specified by:
onDir in interface Issue

onProject

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

Specified by:
onProject in interface Issue

atLine

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

Specified by:
atLine in interface Issue

effortToFix

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

Specified by:
effortToFix in interface Issue

message

public DefaultIssue message(String message)
Description copied from interface: Issue
Message of the issue.

Specified by:
message in interface Issue

overrideSeverity

public Issue overrideSeverity(@Nullable
                              Issue.Severity severity)
Description copied from interface: Issue
Override severity of the issue. Setting a null value or not calling this method means to use severity configured in quality profile.

Specified by:
overrideSeverity in interface Issue

ruleKey

public RuleKey ruleKey()
Description copied from interface: Issue
The RuleKey of this issue.

Specified by:
ruleKey in interface Issue

inputPath

@CheckForNull
public InputPath inputPath()
Description copied from interface: Issue
The InputPath this issue belongs to. Returns null if issue is global to the project.

Specified by:
inputPath in interface Issue

line

public Integer line()
Description copied from interface: Issue
Line of the issue. Null for global issues and issues on directories. Can also be null for files (issue global to the file).

Specified by:
line in interface Issue

message

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

Specified by:
message in interface Issue

overridenSeverity

public Issue.Severity overridenSeverity()
Description copied from interface: Issue
Overriden severity.

Specified by:
overridenSeverity in interface Issue

effortToFix

public Double effortToFix()
Description copied from interface: Issue
Effort to fix the issue. Used by technical debt model.

Specified by:
effortToFix in interface Issue

key

public String key()

doSave

public void doSave()
Specified by:
doSave in class DefaultStorable

withKey

public DefaultIssue withKey(String key)
For testing only.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009–2015 SonarSource. All rights reserved.