Class DefaultIssueLocation
- java.lang.Object
-
- org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation
-
- All Implemented Interfaces:
IssueLocation,NewIssueLocation
public class DefaultIssueLocation extends java.lang.Object implements NewIssueLocation, IssueLocation
-
-
Field Summary
-
Fields inherited from interface org.sonar.api.batch.sensor.issue.NewIssueLocation
MESSAGE_MAX_SIZE
-
-
Constructor Summary
Constructors Constructor Description DefaultIssueLocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultIssueLocationat(TextRange location)Position in the file.InputComponentinputComponent()TheInputComponentthis location belongs to.java.lang.Stringmessage()Message of the issue.DefaultIssueLocationmessage(java.lang.String message)Optional, but recommended, plain-text message for this location.DefaultIssueLocationon(InputComponent component)TheInputComponentthe issue location belongs to.TextRangetextRange()Range of the issue.
-
-
-
Method Detail
-
on
public DefaultIssueLocation on(InputComponent component)
Description copied from interface:NewIssueLocationTheInputComponentthe issue location belongs to. Mandatory.- Specified by:
onin interfaceNewIssueLocation
-
at
public DefaultIssueLocation at(TextRange location)
Description copied from interface:NewIssueLocationPosition in the file. Only applicable whenNewIssueLocation.on(InputComponent)has been called with an InputFile. SeeInputFile.newRange(org.sonar.api.batch.fs.TextPointer, org.sonar.api.batch.fs.TextPointer)- Specified by:
atin interfaceNewIssueLocation
-
message
public DefaultIssueLocation message(java.lang.String message)
Description copied from interface:NewIssueLocationOptional, but recommended, plain-text message for this location.
Formats like Markdown or HTML are not supported. Size must not be greater thanNewIssueLocation.MESSAGE_MAX_SIZEcharacters.- Specified by:
messagein interfaceNewIssueLocation
-
inputComponent
public InputComponent inputComponent()
Description copied from interface:IssueLocationTheInputComponentthis location belongs to.- Specified by:
inputComponentin interfaceIssueLocation
-
textRange
public TextRange textRange()
Description copied from interface:IssueLocationRange of the issue. Null for global issues and issues on directories. Can also be null for files (issue global to the file).- Specified by:
textRangein interfaceIssueLocation
-
message
public java.lang.String message()
Description copied from interface:IssueLocationMessage of the issue.- Specified by:
messagein interfaceIssueLocation
-
-