record components as a first class reflection element
john.r.rose at oracle.com
Wed Sep 25 00:38:44 UTC 2019
On Sep 24, 2019, at 1:47 PM, Vicente Romero <vicente.romero at oracle.com> wrote:
> On 9/24/19 4:07 PM, Maurizio Cimadamore wrote:
>> Question - should RecordComponent extend java.lang.reflect.Member (after all, it has a name and a type). Not 100% sure.
> good question, I would say yes, we can say that record components are members of the class, but I'm not 100% sure either
Turning this crank once more, I’d say that the presence of isVarArgs and the generic
string as queries is evidence that we are looking at this factoring:
(RecordComponent | Method | Constructor) <: Executable <: (AccessibleObject & Member & GenericDeclaration)
In this account, “Method getAccessor” would become either unnecessary, or a low-level sideshow.
(Raising the question: Should the jlr.Method of an RC be synthetic, or should the same API point
be reflected in two places?)
More information about the amber-spec-observers