Class AnalyzerMessage

java.lang.Object
org.sonar.java.reporting.AnalyzerMessage

public class AnalyzerMessage extends Object
Class used to represent analyzer issue messages
  • Field Details

  • Constructor Details

    • 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 Details

    • 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
    • getLine

      @Nullable public Integer getLine()
      Returns:
      null, when target of a message - is a file
    • getMessage

      public String getMessage()
    • getCost

      @Nullable public Double getCost()
    • textSpanFor

      public static AnalyzerMessage.TextSpan textSpanFor(Tree syntaxNode)
    • textSpanBetween

      public static AnalyzerMessage.TextSpan textSpanBetween(Tree startTree, Tree endTree)
    • textSpanBetween

      public static AnalyzerMessage.TextSpan textSpanBetween(Tree startTree, boolean includeStart, Tree endTree, boolean includeEnd)
    • toString

      public String toString()
      Overrides:
      toString in class Object