Updated JEP: nestmates

Peter Levart peter.levart at gmail.com
Fri Apr 14 22:00:55 UTC 2017



On 04/14/2017 10:34 PM, John Rose wrote:
> Regarding javac:  It would be polite if javac were to agree that if the output classfile
> has an InnerClasses attribute, and the current class either records an outer-class
> or the current class*is*  an outer-class, then the classfile will also have one of the
> nestmate attributes.
>
> But the system has to be robust if javac drops the ball once in a while.
> And it certainly has to read down-rev class files correctly.

...at first it appears that down-rev files might not need to be treated 
as nest-mates on the basis of their InnerClasses attributes. They have 
access bridges to communicate.

But someone might want to "inject" a dynamically generated nestmate into 
a self-nest of an old-rev top-level class then which communicates with 
nested classes via bridges and expect from this dynamically generated 
class to have access to private members of nested classes too. So 
treating down-rev files' InnerClasses attributes as nestmate metadata 
might be necessary.

Regards, Peter




More information about the valhalla-dev mailing list