RFR: 8214126: Method signatures not formatted correctly in browser

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue May 28 17:59:04 UTC 2019


On 05/28/2019 07:04 AM, Hannes Wallnöfer wrote:
>  From an implementation side, I created a new HtmlTree subclass called MemberSignatureTree as an inner class of AbstractMemberWriter that implements the display policies listed above. It is used by all member signature writers, simplifying the #getSignature methods in various MemberWriter classes quite a bit.

Just from reading the description in this sentence, and without looking 
at the code yet, the style for such objects is to make them be "builder" 
objects ... not inheriting HtmlTree but having a "toContent" method that 
generates the tree when all the relevant information has been provided 
via set/add/put methods.

It makes sense to use a shared object to simplify the signature writes, 
but it doesn't sound right for it to be a subtype of HtmlTree, which is 
generally supposed to be a low level element that just has a tag, 
attributes and content.

-- Jon


More information about the javadoc-dev mailing list