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 DefaultIssueLocation
at(TextRange location)
Position in the file.InputComponent
inputComponent()
TheInputComponent
this location belongs to.java.lang.String
message()
Message of the issue.DefaultIssueLocation
message(java.lang.String message)
Optional, but recommended, plain-text message for this location.DefaultIssueLocation
on(InputComponent component)
TheInputComponent
the issue location belongs to.TextRange
textRange()
Range of the issue.
-
-
-
Method Detail
-
on
public DefaultIssueLocation on(InputComponent component)
Description copied from interface:NewIssueLocation
TheInputComponent
the issue location belongs to. Mandatory.- Specified by:
on
in interfaceNewIssueLocation
-
at
public DefaultIssueLocation at(TextRange location)
Description copied from interface:NewIssueLocation
Position 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:
at
in interfaceNewIssueLocation
-
message
public DefaultIssueLocation message(java.lang.String message)
Description copied from interface:NewIssueLocation
Optional, but recommended, plain-text message for this location.
Formats like Markdown or HTML are not supported. Size must not be greater thanNewIssueLocation.MESSAGE_MAX_SIZE
characters.- Specified by:
message
in interfaceNewIssueLocation
-
inputComponent
public InputComponent inputComponent()
Description copied from interface:IssueLocation
TheInputComponent
this location belongs to.- Specified by:
inputComponent
in interfaceIssueLocation
-
textRange
public TextRange textRange()
Description copied from interface:IssueLocation
Range of the issue. Null for global issues and issues on directories. Can also be null for files (issue global to the file).- Specified by:
textRange
in interfaceIssueLocation
-
message
public java.lang.String message()
Description copied from interface:IssueLocation
Message of the issue.- Specified by:
message
in interfaceIssueLocation
-
-