Package codeanalysis

Class Diagnostic

java.lang.Object
codeanalysis.Diagnostic

public class Diagnostic extends Object
The Diagnostic class represents a diagnostic message produced during code analysis. It contains information about the location of the issue in the source code (specified by a TextSpan) and the corresponding error message.
Version:
1.0
Author:
Siyabend Urun
See Also:
  • Constructor Details

    • Diagnostic

      public Diagnostic(TextSpan span, String message)
      Constructs a Diagnostic object with the specified TextSpan and error message.
      Parameters:
      span - The TextSpan representing the location of the issue in the source code.
      message - The error message describing the issue.
  • Method Details

    • getSpan

      public TextSpan getSpan()
      Gets the TextSpan representing the location of the issue in the source code.
      Returns:
      The TextSpan.
    • getMessage

      public String getMessage()
      Gets the error message describing the issue.
      Returns:
      The error message.
    • toString

      public String toString()
      Returns the error message as a string representation of the Diagnostic.
      Overrides:
      toString in class Object
      Returns:
      The error message.