Package org.gradle.api.problems
Interface Problem
Interface for describing structured information about a problem.
- Since:
- 8.13
-
Method Summary
Modifier and TypeMethodDescriptionAdditional data attached to the problem.Declares a short, but context-dependent message for this problem.Returns additional locations, which can help to understand the problem further.Returns the problem definition, i.e.A long description detailing the problem.The exception that caused the problem.Returns the locations where the problem originated.Returns solutions and advice that contain context-sensitive data, e.g.
-
Method Details
-
getDefinition
ProblemDefinition getDefinition()Returns the problem definition, i.e. the data that is independent of the report context.- Since:
- 8.13
-
getContextualLabel
Declares a short, but context-dependent message for this problem.- Returns:
- the contextual label, or null if not available.
- Since:
- 8.13
-
getSolutions
Returns solutions and advice that contain context-sensitive data, e.g. the message contains references to variables, locations, etc.- Since:
- 8.13
-
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
The exception that caused the problem.- Since:
- 8.13
-
getAdditionalData
Additional data attached to the problem.The supported types are listed on
AdditionalData.- Since:
- 8.13
-