Interface Problem


@Incubating public interface Problem
Interface for describing structured information about a problem.
Since:
8.13
  • Method Details

    • getDefinition

      ProblemDefinition getDefinition()
      Returns the problem definition, i.e. the data that is independent of the report context.
      Since:
      8.13
    • getContextualLabel

      @Nullable String getContextualLabel()
      Declares a short, but context-dependent message for this problem.
      Returns:
      the contextual label, or null if not available.
      Since:
      8.13
    • getSolutions

      List<String> getSolutions()
      Returns solutions and advice that contain context-sensitive data, e.g. the message contains references to variables, locations, etc.
      Since:
      8.13
    • getDetails

      @Nullable String getDetails()
      A long description detailing the problem.

      Details can elaborate on the problem, and provide more information about the problem. They can be multiple lines long, but should not detail solutions; for that, use getSolutions().

      Since:
      8.13
    • getOriginLocations

      List<ProblemLocation> getOriginLocations()
      Returns the locations where the problem originated.

      Might be empty if the origin is not known.

      Since:
      8.13
    • getContextualLocations

      List<ProblemLocation> getContextualLocations()
      Returns additional locations, which can help to understand the problem further.

      For example, if a problem was emitted during task execution, the task path will be available in this list.

      Might be empty if there is no meaningful contextual information.

      Since:
      8.13
    • getException

      @Nullable Throwable getException()
      The exception that caused the problem.
      Since:
      8.13
    • getAdditionalData

      @Nullable AdditionalData getAdditionalData()
      Additional data attached to the problem.

      The supported types are listed on AdditionalData.

      Since:
      8.13