New candidate JEP: 397: Sealed Classes (Second Preview)


Enhance the Java programming language with sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.…

More at https://mail.openjdk.java.net/pipermail/jdk-dev/2020-October/004880.html