RFR: JDK-8313349: Introduce `abstract void HtmlDocletWriter.buildPage()`
Pavel Rappo
prappo at openjdk.org
Wed Aug 2 21:10:10 UTC 2023
On Tue, 1 Aug 2023 23:52:15 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> Please review a medium size update that is the last in the series of recent updates to refactor and simplify builders and writers.
>
> Having cleared away some of the earlier obfuscation, it becomes clear that all subtypes of `HtmlDocletWriter` generate pages for the overall documentation, and so a new abstract method `buildPage` is introduced to make that more obvious. This resulted in renaming some existing `build` methods and/or removing some static `generate` methods, though some of the more complex ones still remain.
>
> In addition, all writers are now generally created by the `WriterFactory` class, providing an extension point should it ever be needed to subtype these classes. The methods on `WriterFactory` return the appropriate supertype (`HtmlDocletWriter` or `AbstractMemberWriter`) thus enforcing the use of the standard abstract methods that are now available.
>
> There is also some cleanup to some of the member writers, including introducing more abstract methods to define common behavior, simplifying some method signatures, removing unused code, and providing documentation comments.
Changes requested by prappo (Reviewer).
That's good cleanup, Jon. Do please jcheck ("Whitespace error") to allow this PR to move further along the Skara pipeline.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java line 53:
> 51: }
> 52:
> 53:
Remove the newline.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java line 93:
> 91: *
> 92: * @param configuration the configuration
> 93: * @param mapper a "mapper' containing the usage information
Match quotes.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 120:
> 118: /**
> 119: * The base class for classes that write complete HTML pages to be included in the overall API documentation.
> 120: * The primary method is `{@link #buildPage()}.
Remove stray backtick.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java line 50:
> 48: * such as deprecated elements, preview elements, and so on.
> 49: *
> 50: * @param <B> a builder, to build the specific summary information to be written
Rewrite the sentence for clarity.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java line 93:
> 91: protected final B builder;
> 92:
> 93:
Remove the newline.
-------------
PR Review: https://git.openjdk.org/jdk/pull/15114#pullrequestreview-1558932811
PR Comment: https://git.openjdk.org/jdk/pull/15114#issuecomment-1662143229
PR Review Comment: https://git.openjdk.org/jdk/pull/15114#discussion_r1281869038
PR Review Comment: https://git.openjdk.org/jdk/pull/15114#discussion_r1281870360
PR Review Comment: https://git.openjdk.org/jdk/pull/15114#discussion_r1281857513
PR Review Comment: https://git.openjdk.org/jdk/pull/15114#discussion_r1281896851
PR Review Comment: https://git.openjdk.org/jdk/pull/15114#discussion_r1281863570
More information about the javadoc-dev
mailing list