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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access