Package org.gradle.tooling.events.problems

# Interface ProblemContext

@Incubating public interface ProblemContext
Describes a problem event.

Provides all details provided for problem events. The events are generated via the Problems API.

Since:
  8.8

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Location>`
  `getContextualLocations()`
  Returns additional locations, which can help to understand the problem further.
  `Details`
  `getDetails()`
  Returns the details string.
  `Failure`
  `getFailure()`
  Returns the failure associated with this problem.
  `List<Location>`
  `getOriginLocations()`
  Returns the locations where the problem originated.
  `List<Solution>`
  `getSolutions()`
  Returns the list of solutions.

- ## Method Details

  - ### getDetails

    @Nullable Details getDetails()
    Returns the details string.
    Returns:
      the problem details
    Since:
      8.8

  - ### getOriginLocations

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

    Might be empty if the origin is not known.

    Returns:
      the origin locations
    Since:
      8.12

  - ### getContextualLocations

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

    Might be empty if there is no meaningful contextual information.

    Returns:
      the contextual locations
    Since:
      8.12

  - ### getSolutions

    List<Solution> getSolutions()
    Returns the list of solutions.
    Returns:
      the solutions
    Since:
      8.8

  - ### getFailure

    @Nullable Failure getFailure()
    Returns the failure associated with this problem.
    `null` if run against a Gradle version prior to 8.7
    Returns:
      the failure
    Since:
      8.8