Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8176131

Simplify new Taglet API

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b161
    • Verification:
      Verified

      Backports

        Description

        The new Taglet API added as part of the new Doclet API has two similar .toString methods, one takes a DocTree and the other takes a List<DocTree>. The documentation does not explain when each might be called (which is a bug in itself) but the fact is, we don't need both: we can eliminate the one that takes a single DocTree and always/only use the one taking a List<DocTree>.

        In addition, we should clarify the use of this method.

        The API is currently:


            /**
             * Given the {@link DocTree DocTree} representation of this custom
             * tag, return its string representation, which is output
             * to the generated page.
             * @param tag the <code>Tag</code> representation of this custom tag.
             * @return the string representation of this <code>Tag</code>.
             */
            String toString(DocTree tag);

            /**
             * Given a List of {@link DocTree DocTrees} representing this custom
             * tag, return its string representation, which is output
             * to the generated page. This method should
             * return null if this taglet represents an inline or body tag.
             * @param tags the list of <code>DocTree</code>s representing this custom tag.
             * @return the string representation of this <code>Tag</code>.
             */
            String toString(List<? extends DocTree> tags);

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jjg Jonathan Gibbons
                Reporter:
                jjg Jonathan Gibbons
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: