Certain types are meant to be *sealed*, not extendable/implementable outside of a certain known set of types (see JDK-8222777).
Until such a language mechanism exists, it could be helpful to include a "@Meant-to-be-sealed" annotation to help document the intended semantic restriction and to guide compiler warnings.
Until such a language mechanism exists, it could be helpful to include a "@Meant-to-be-sealed" annotation to help document the intended semantic restriction and to guide compiler warnings.
- relates to
-
JDK-8224243 Add implSpec's to AccessibleObject and seal Executable
- Resolved
-
JDK-8183273 Clarify Instrumentation interface should not be implemented outside java.instrument module
- Resolved
-
JDK-8222777 JEP 359: Records (Preview)
- Closed