javac's allparams(): returns type arguments, yes?

Laird Nelson ljnelson at gmail.com
Tue Jun 13 17:01:53 UTC 2023


I am reading some javac code to satisfy some curiosity and wanted to
quickly confirm something.

I noticed that the com.sun.tools.javac.code.Type#allparams() method
actually operates on type *arguments*, correct, despite its name implying
(to me, used to the Java language model terminology) otherwise?

So in the case of a type representing Outer<String>.Inner<Number>,
allparams(innerType) would presumably return the String and Number type
*arguments*, and not the formal type parameter elements (S and N or
whatever) corresponding to them?

Related: the getTypeArguments() method works on a field called
typarams_field; I'm assuming again that the typarams_field field stores
type *arguments*, not formal type parameter elements?

L
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230613/c5730c41/attachment.htm>


More information about the compiler-dev mailing list