-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
low
-
The behavior of the existing getDocComment method is enhanced to recognize the new kind of comment, and a new method is added to inspect the kind of documentation comment that may be present.
-
Java API
-
SE
Summary
Support the new "end-of-line"-style documentation comments introduced by JEP 467.
Problem
JEP 467 introduces a new "kind" of documentation comment, based on the use of end-of-line comments. While this is primarily a JDK feature for use by the javadoc
tool, the Java SE class javax.lang.model.util.Elements
exposes the ability to access the documentation comment for an Element
.
At a minimum, the specification of the existing getDocComment
method needs to be updated to accommodate the new kind of comment. Given that it may be reasonable to assign different semantics to the different "kinds" of comment (traditional and end-of-line), it is desirable to expose that difference as well to anyone wanting to access the documentation comment for an element.
Solution
- Update the specification for
Elements.getDocComment
- Introduce
enum DocCommentKind
to represent the different kinds of documentation comment, and add a new method inElements
to access the kind of comment for an element.
Specification
The API differences are attached, in both specdiff and apidiff format. The latest version is .04
.
The differences can also be viewed here: https://cr.openjdk.org/~jjg/8329296/
- csr of
-
JDK-8329296 Update Elements for '///' documentation comments
-
- Resolved
-
- relates to
-
JDK-8298687 Support Markdown in the standard doclet
-
- Closed
-