RFR: 8300517: Refactor VisibleMemberTable (method members) [v2]

Pavel Rappo prappo at openjdk.org
Fri Mar 10 15:35:27 UTC 2023


On Tue, 7 Mar 2023 23:36:47 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Respond to feedback
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java line 311:
> 
>> 309:         }
>> 310:         Contents contents = writer.contents;
>> 311:         var enclosing = (TypeElement) method.getEnclosingElement();
> 
> Wishlist for Language Model: default methods that return a narrower result type:
> 
> interface Demo {
>    ...>     Element getEnclosingElement(Element e);
>    ...>     default TypeElement getEnclosingElement(ExecutableElement ee) {
>    ...>         return (TypeElement) getEnclosingElement((Element) ee);
>    ...>     }
>    ...>     default TypeElement getEnclosingElement(VariableElement ve) {
>    ...>         return (TypeElement) getEnclosingElement((Element) ve);
>    ...>     }
>    ...> }
>    ```

cc'ing @jddarcy

-------------

PR: https://git.openjdk.org/jdk/pull/12887


More information about the javadoc-dev mailing list