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

Clean up common behavior in "page writers" and "member writers"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • tools
    • None

      Following JDK-8312044 it became clear that there is a lack of reasonable common behavior among groups of related classes.

      For example, `HtmlDoclet` caused a number of pages to be generated, but there is no common `generatePage` method. Sure, all the page writers individually implement `build`, but there is no common definition of that method. (Nor was there, in the recently-deleted builder classes; the method was just there "by convention".)

      Related, various pages contain "members", but there is no common way that members are handled. Even on the `ClassWriter` page, the summary tables are handled in a very different fashion to the detail lists for each kind of member. In general, the various subtypes of `AbstractMemberWriter` should provide similar methods for the different kinds of member, so that the enclosing page can just iterate over the kinds of `AbstractMemberWriter` to generate the appropriate content. This is done haphazardly, with the result that while some member writers provide the _ability_ to generate kinds of content, the methods are not always invoked. (This was revealed in the work for JDK-8312044, by the IDE reporting that some methods were not called.)

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: