Clarifying record reflective support

Brian Goetz brian.goetz at oracle.com
Tue Dec 3 17:15:19 UTC 2019


I am not even sure if “has a record attribute” isn’t overkill.  “Is a record class” is the more proper semantic specification, and it’s not clear to me that reflection api spec is the place to record these things.  

Sent from my MacBook Wheel

> On Dec 3, 2019, at 12:12 PM, Alex Buckley <alex.buckley at oracle.com> wrote:
> 
> On 12/3/2019 8:49 AM, Dan Smith wrote:
>> So,
>> Fine: "isRecord returns true if the class extends java.lang.Record
>> and has a Record attribute." (a little more detailed than most
>> reflection methods, but that's probably good)
>> Overkill: "isRecord returns true if the class extends
>> java.lang.Record and has a Record attribute that conforms to the
>> following rules ..."
> 
> Yes. "has a Record attribute" is the most that the broadly-read API spec should admit about the class file. Even "has a *well-formed* Record attribute" would be too much, since it quickly devolves into your overkill scenario.
> 
> Alex



More information about the amber-spec-experts mailing list