On 12/10/2019 22:17, fo...@univ-mlv.fr wrote:
BTW, Should java.lang.Class have a method getCanonicalRecordConstructor() ?

This would be helpful, as the serialization use case already shows us that people would want to infer the signature of the canonical descriptor from the accessors return types. Which is doable, but a bit tedious to do. I was also worried, if we drop the 'isVarargs' from the component about how a client might reconstruct vararg-ness of the constructor. In the reflective lookup that's not too important, after all the runtime type of the components is the same, regardless of varargs) - but for source reflection this might be more important to reconstruct correctly - so I think it would be nice to have an official 'link' between the record/class and its canonical constructor, both in core reflection, and source reflection.

Maurizio


BTW2, if in the future we need some access flags on record components, we can 
still add a new attribute like MethodParameters on the Record attribute, so the 
current binary format is Ok.

Reply via email to