Hidden classes + class data

Mandy Chung mandy.chung at oracle.com
Sat Nov 23 00:54:31 UTC 2019



On 11/22/19 1:03 PM, forax at univ-mlv.fr wrote:
> again, correct me if i'm wrong, technically, it's not really dynamic nestmates, it's more nest host delegation ?
> The hidden class being able to delegate all the security checks to another class.

A hidden class does have the same nest access as specified in JVMS, i.e. 
all members (ordinary or hidden classes) in the same nest can access 
each other's private members.

OTOH, VM anonymous class is more of "nest host delegation"  which may be 
what you are thinking.  It is not added to other's nest.

A hidden class [1] can join the nest of the lookup class by defining it 
with NESTMATE class option.   If the lookup class is LC that defines HC 
as a nestmate, HC will join the nest of LC whose nest host is equivalent 
to the class returned by LC.getNestHost().  The hidden nestmate classes 
section in [1] would need some  editing but hope that gives a good 
starting point (that reflects the discussion [2][3])

Mandy
[1] https://bugs.openjdk.java.net/browse/JDK-8220607
[2] 
https://mail.openjdk.java.net/pipermail/valhalla-dev/2019-October/006429.html
[3] 
https://mail.openjdk.java.net/pipermail/valhalla-dev/2019-November/006535.html 



More information about the valhalla-dev mailing list