Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224022

Add @Meant-to-be-sealed annotation type to guide compiler warnings

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: