javac's allparams(): returns type arguments, yes?
Laird Nelson
ljnelson at gmail.com
Mon Jun 19 21:51:00 UTC 2023
On Mon, Jun 19, 2023 at 10:49 AM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> the naming of these methods is unfortunate
>
Sure; no judgment on my part. Just seeking clarification.
> You are correct in pointing out that both `allparams` and
> `getTypeArguments` are really about "type arguments" (use site).
>
> The only difference is that the former only returns the type arguments
> of the generic class type (or generic method) it is called on, whereas
> the latter will recurse up to the outermost generic type (and return
> _all_ the type arguments - this is useful e.g. when performing type
> susbtitution).
>
(I think you have "former" and "latter" confused here? allparams "will
recurse up to the outermost generic type…", yes? And "getTypeArguments"
"returns the type arguments of the generic class type…it is called on"?
Anyway, thank you for the clarification.)
L
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230619/33ef4297/attachment.htm>
More information about the compiler-dev
mailing list