Provide new methods and clarifications for the
Historically, javadoc has not specified the use of streams for diagnostics and other output. This follows from the then-prevailing practice for javac, and annotation processors. javac has since improved the support for specifying streams, and javadoc should do the same, and this extends to doclets used by javadoc.
The existing specification is incorrect in a number of places: most notably the specification refers to "error messages and error counts" even though the method may apply to arbitrary diagnostic kinds.
The existing API can only report diagnostics associated with the position of an element or a node in a documentation comment tree.
New methods are added to
Reporterto provide access to the "standard" and "diagnostics" streams used by the javadoc tool. The methods are on an interface. The specification allows the default implementation to return
null, but specifies that the methods will not return
nullfor the instance of
Reporterused by the javadoc tool to initialize doclets.
The existing comments are corrected and clarified.
A new method is added that can report a diagnostic at an arbitrary position in a range of characters in a specified file.
A specdiff is attached. A copy of the changes can be seen here: http://cr.openjdk.java.net/~jjg/8267204/specdiff.00/jdk.javadoc/jdk/javadoc/doclet/Reporter.html