-
Enhancement
-
Resolution: Fixed
-
P4
-
22
-
b10
AbstractMemberWriter now defines abstract methods for `buildSummary` and `buildDetails`.
All subtypes of `HtmlDocletWriter` generate pages, but there is no common `buildPage` method, to help highlight that property.
Instead, there is a mixture of creating instances and calling a `build()` method (all unrelated by a super-method) or by calling a static `generate` method. See the attached analysis.
If we look into the root of the various generate methods, at some point they all create an instance and call an instance-specific method. In each case that I've looked at so far, it would be possible to wrap or replace that method with a standardized override of a new method called something like HtmlDocletWriter.buildPage.
This would at least allow HtmlDocletWriter to become an abstract class defining buildPage and for all instances to follow suit. We could equally follow the methodology to use WriterFactory to create all these writers, even if we leave the generate methods in place, at this stage.
This would be a relatively simple update, just tweaking writer classes to conform to a common paradigm, without needing to move or delete any classes (JDK-8312044) or code (JDK-8312201).
Such a change would help emphasize the main "entry point" for each writer class that is a subtype of HtmlDocletWriter. It would also help emphasise something that has not been so obvious until recently: all subtypes of HtmlDocletWriter generate pages in the overall doc output. (edited)
All subtypes of `HtmlDocletWriter` generate pages, but there is no common `buildPage` method, to help highlight that property.
Instead, there is a mixture of creating instances and calling a `build()` method (all unrelated by a super-method) or by calling a static `generate` method. See the attached analysis.
If we look into the root of the various generate methods, at some point they all create an instance and call an instance-specific method. In each case that I've looked at so far, it would be possible to wrap or replace that method with a standardized override of a new method called something like HtmlDocletWriter.buildPage.
This would at least allow HtmlDocletWriter to become an abstract class defining buildPage and for all instances to follow suit. We could equally follow the methodology to use WriterFactory to create all these writers, even if we leave the generate methods in place, at this stage.
This would be a relatively simple update, just tweaking writer classes to conform to a common paradigm, without needing to move or delete any classes (
Such a change would help emphasize the main "entry point" for each writer class that is a subtype of HtmlDocletWriter. It would also help emphasise something that has not been so obvious until recently: all subtypes of HtmlDocletWriter generate pages in the overall doc output. (edited)