RFR: JDK-8283594: Improve docs of ElementScanner classes [v3]
Joe Darcy
darcy at openjdk.java.net
Thu Mar 24 01:01:48 UTC 2022
On Thu, 24 Mar 2022 00:24:36 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> In the implementation, it looks like the `visitXYZ` methods call the `scan(Iterable<? extends Element>, P p)` methods.
>
> However, it is notable that the `Iterable` overload is `final`, (along with the 3rd overload that defaults the `P` parameter), thus effectively guaranteeing that the `scan` method that takes a single `Element` will indeed be called.
Right; calling "scan(Element, P)" as an implementation detail happens by using a call to the final scan method accepting an iterable.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7932
More information about the compiler-dev
mailing list