What is nest-based access?

JEP 181 introduces nest-based access control. As you know, classes and interfaces, which are defined within another class or interface are compiled to separate class files. To access each other's private members, compilers had been either broadening their access levels or inserting bridge methods.

Nest-based access control allows such classes and interfaces to access each other's private members, without any workarounds (or bridge code) by the compiler.

Nest-based access control also results in changes to the JVM specification. You can refer to the following link to access these changes (removals are highlighted by a red font background and additions are highlighted using the green background): https://cr.openjdk.java.net/~dlsmith/nestmates.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.255.187