record components as a first class reflection element
Chris Hegarty
chris.hegarty at oracle.com
Wed Sep 25 16:44:57 UTC 2019
On 25/09/2019 15:46, Remi Forax wrote:
> ...
>
> The other thing is that the return of getMethods() is in any order while i hope that the return of getRecordComponent() be to in the order of declaration
> (the order of the RecordComponent attribute for the VM).
As was discussed in a parallel thread [1], getRecordAccessors ( and its
soon to be replacement, getRecordComponents ) will be specified to
return the components in declaration order. The order is required, among
other things, to be able to lookup the canonical constructor. Without
the ordering guaranteed by the spec, a new getCanonicalConstructor ( or
similarly named method ) would be required.
-Chris.
[1]
https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-September/001607.html
More information about the amber-spec-experts
mailing list