Package org.sonar.java
Class AnalyzerMessage
- java.lang.Object
-
- org.sonar.java.AnalyzerMessage
-
public class AnalyzerMessage extends Object
Class used to represent analyzer issue messages
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnalyzerMessage.TextSpan
-
Field Summary
Fields Modifier and Type Field Description List<List<AnalyzerMessage>>
flows
-
Constructor Summary
Constructors Constructor Description AnalyzerMessage(JavaCheck check, org.sonar.api.batch.fs.InputComponent inputComponent, int line, String message, int cost)
AnalyzerMessage(JavaCheck check, org.sonar.api.batch.fs.InputComponent inputComponent, AnalyzerMessage.TextSpan textSpan, String message, int cost)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaCheck
getCheck()
Double
getCost()
org.sonar.api.batch.fs.InputComponent
getInputComponent()
Integer
getLine()
String
getMessage()
AnalyzerMessage.TextSpan
primaryLocation()
static AnalyzerMessage.TextSpan
textSpanBetween(Tree startTree, Tree endTree)
static AnalyzerMessage.TextSpan
textSpanFor(Tree syntaxNode)
String
toString()
-
-
-
Field Detail
-
flows
public final List<List<AnalyzerMessage>> flows
-
-
Constructor Detail
-
AnalyzerMessage
public AnalyzerMessage(JavaCheck check, org.sonar.api.batch.fs.InputComponent inputComponent, int line, String message, int cost)
-
AnalyzerMessage
public AnalyzerMessage(JavaCheck check, org.sonar.api.batch.fs.InputComponent inputComponent, @Nullable AnalyzerMessage.TextSpan textSpan, String message, int cost)
-
-
Method Detail
-
getCheck
public JavaCheck getCheck()
-
getInputComponent
public org.sonar.api.batch.fs.InputComponent getInputComponent()
-
primaryLocation
@Nullable public AnalyzerMessage.TextSpan primaryLocation()
- Returns:
- null, when target of a message - is a file
-
getMessage
public String getMessage()
-
textSpanFor
public static AnalyzerMessage.TextSpan textSpanFor(Tree syntaxNode)
-
textSpanBetween
public static AnalyzerMessage.TextSpan textSpanBetween(Tree startTree, Tree endTree)
-
-