API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

John Rose john.r.rose at oracle.com
Mon Feb 12 19:20:02 UTC 2018

On Feb 12, 2018, at 10:52 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> If a class has no nestmates is it implicitly a nest of itself?

Logically, every class is exactly one nest.  In the absence of
Nest* attributes, the nest is a singleton.

There are sometimes secondary reasons to distinguish an
explicit singleton from an implicit one, reasons which don't affect
member access control.  The Lookup::in API wants to be sensitive
the distinction in some way, so that it can use InnerClasses
for old code, but ditch that in favor of NestMates in new code.

We could ask reflection to show that distinction directly, or
(maybe better) we could have Lookup::in grub it directly
out of some secret channel.  I'm on the fence about this.

— John

More information about the valhalla-spec-observers mailing list