> On Nov 25, 2019, at 7:02 PM, Alex Buckley <[email protected]> wrote: > > // Cutting amber-dev > > On 11/25/2019 3:23 PM, Gavin Bierman wrote: >> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jvms.html > > The JVMS draft is good. It should have an informative note in 4.7.8: "It is > an oversight in the design of the `class` file that there is no way to flag > compiler-generated methods which are not considered implementation artifacts > (JLS 13.1). This oversight means that reflective APIs may not accurately > indicate the mandated status of such methods." These words may not look like > much to you, but commentary about what the class file CAN'T do is pure gold > to readers, and will help us recollect the situation many years from now. I > accept that "more notes == more stuff to update when situations change" -- > that is the risk we take for the reward of informing our readers.
Here's my slightly-tweaked version of this note: > It is a limitation of the `class` file that, while a method parameter or a > module may be marked `ACC_MANDATED` ([4.7.24], [4.7.25]), there is no > equivalent way to flag compiler-generated methods and fields which are not > considered implementation artifacts (JLS 13.1). > This limitation means that reflective APIs may not accurately indicate the > mandated status of such members.
