Module jdk.javadoc

Interface Reporter


public interface Reporter
Interface for reporting diagnostics and other messages.

Diagnostics consist of a diagnostic kind and a message, and may additionally be associated with an element, a tree node in a documentation comment, or an arbitrary position in a given file. Other messages may be written directly to one of two streams that are informally for use by "standard output" and "diagnostic output", where "standard output" means the output that is the expected result of executing some operation, such as the command-line help that is generated when using a --help option, and "diagnostic output" refers to any errors, warnings and other output that is a side effect of executing the operation.

The exact manner in which diagnostics are output is unspecified and depends on the enclosing context. For example:

  • The DocumentationTool API allows a client to specify a DiagnosticListener to which diagnostics will be reported. If no listener is specified, diagnostics will be written to a given stream, or to System.err if no such stream is provided.
  • The ToolProvider API allows a client to specify the streams to be used for reporting standard and diagnostic output.
Since:
9