Schnittstelle ProblemSpec


@Incubating public interface ProblemSpec
Provides options to configure problems.
Seit:
8.6
Siehe auch:
  • Methodendetails

    • contextualLabel

      ProblemSpec contextualLabel(String contextualLabel)
      Declares a short, but context-dependent message for this problem.
      Parameter:
      contextualLabel - the short message
      Gibt zurück:
      this
      Seit:
      8.8
    • documentedAt

      ProblemSpec documentedAt(String url)
      Declares where this problem is documented.
      Gibt zurück:
      this
      Seit:
      8.6
    • fileLocation

      ProblemSpec fileLocation(String path)
      Declares that this problem is in a file.
      Parameter:
      path - the file location
      Gibt zurück:
      this
      Seit:
      8.6
    • lineInFileLocation

      ProblemSpec lineInFileLocation(String path, int line)
      Declares that this problem is in a file on a line.
      Parameter:
      path - the file location
      line - the one-indexed line number
      Gibt zurück:
      this
      Seit:
      8.6
    • lineInFileLocation

      ProblemSpec lineInFileLocation(String path, int line, int column)
      Declares that this problem is in a file with on a line at a certain position.
      Parameter:
      path - the file location
      line - the one-indexed line number
      column - the one-indexed column
      Gibt zurück:
      this
      Seit:
      8.6
    • lineInFileLocation

      ProblemSpec lineInFileLocation(String path, int line, int column, int length)
      Declares that this problem is in a file with on a line at a certain position.
      Parameter:
      path - the file location
      line - the one-indexed line number
      column - the one-indexed column
      length - the length of the text
      Gibt zurück:
      this
      Seit:
      8.6
    • offsetInFileLocation

      ProblemSpec offsetInFileLocation(String path, int offset, int length)
      Declares that this problem is in a file at a certain global position with a given length.
      Parameter:
      path - the file location
      offset - the zero-indexed global offset from the beginning of the file
      length - the length of the text
      Gibt zurück:
      this
      Seit:
      8.6
    • stackLocation

      ProblemSpec stackLocation()
      Declares that this problem is at the same place where it's reported. The stack trace will be used to determine the location.
      Gibt zurück:
      this
      Seit:
      8.6
    • details

      ProblemSpec details(String details)
      Declares 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 solution(String).

      Parameter:
      details - the details
      Gibt zurück:
      this
      Seit:
      8.6
    • solution

      ProblemSpec solution(String solution)
      Declares solutions and advice that contain context-sensitive data, e.g. the message contains references to variables, locations, etc.
      Parameter:
      solution - the solution.
      Gibt zurück:
      this
      Seit:
      8.6
    • additionalData

      <T extends AdditionalData> ProblemSpec additionalData(Class<T> type, Action<? super T> config)
      Declares additional data attached to the problem.
      Parameter:
      type - The type of the additional data. This can be any type that implements AdditionalData including abstract classes and interfaces. This type will be instantiated and provided as an argument for the Action passed as the second argument.

      The type can have the following properties:

      config - The configuration action for the additional data.
      Gibt zurück:
      this
      Seit:
      8.13
    • withException

      ProblemSpec withException(Throwable t)
      Declares the exception causing this problem.
      Parameter:
      t - the exception.
      Gibt zurück:
      this
      Seit:
      8.11
    • severity

      ProblemSpec severity(Severity severity)
      Declares the severity of the problem.
      Parameter:
      severity - the severity
      Gibt zurück:
      this
      Seit:
      8.6