6558804: Specification for Elements.getDocComment(Element e) should be clarified

Wed, 14 Oct 2009 18:56:37 -0700

author
darcy
date
Wed, 14 Oct 2009 18:56:37 -0700
changeset 425
b8936a7930fe
parent 424
86b773b7cb40
child 426
d1e62f78c48b

6558804: Specification for Elements.getDocComment(Element e) should be clarified
Reviewed-by: jjg

src/share/classes/javax/lang/model/util/Elements.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/javax/lang/model/util/Elements.java	Wed Oct 14 15:41:28 2009 -0700
     1.2 +++ b/src/share/classes/javax/lang/model/util/Elements.java	Wed Oct 14 18:56:37 2009 -0700
     1.3 @@ -77,9 +77,25 @@
     1.4       * Returns the text of the documentation ("Javadoc")
     1.5       * comment of an element.
     1.6       *
     1.7 +     * <p> A documentation comment of an element is a comment that
     1.8 +     * begins with "{@code /**}" , ends with a separate
     1.9 +     * "<code>*&#47</code>", and immediately precedes the element,
    1.10 +     * ignoring white space.  Therefore, a documentation comment
    1.11 +     * contains at least three"{@code *}" characters.  The text
    1.12 +     * returned for the documentation comment is a processed form of
    1.13 +     * the comment as it appears in source code.  The leading "{@code
    1.14 +     * /**}" and trailing "<code>*&#47</code>" are removed.  For lines
    1.15 +     * of the comment starting after the initial "{@code /**}",
    1.16 +     * leading white space characters are discarded as are any
    1.17 +     * consecutive "{@code *}" characters appearing after the white
    1.18 +     * space or starting the line.  The processed lines are then
    1.19 +     * concatenated together (including line terminators) and
    1.20 +     * returned.
    1.21 +     *
    1.22       * @param e  the element being examined
    1.23       * @return the documentation comment of the element, or {@code null}
    1.24       *          if there is none
    1.25 +     * @jls3 3.6 White Space
    1.26       */
    1.27      String getDocComment(Element e);
    1.28  

mercurial