Skip to content
Permalink
Browse files
8265319: implement Sealed Classes as a standard feature in Java, java…
…x.lang.model changes

Reviewed-by: darcy, jlahoda
  • Loading branch information
Vicente Romero committed May 20, 2021
1 parent 726785b commit 31b98e129e6d3051c01775519792b2ba5745b275
@@ -67,18 +67,14 @@

/**
* The modifier {@code sealed}
* @since 15
* @since 17
*/
@jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
reflective=true)
SEALED,

/**
* The modifier {@code non-sealed}
* @since 15
* @since 17
*/
@jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
reflective=true)
NON_SEALED {
public String toString() {
return "non-sealed";
@@ -207,10 +207,8 @@
*
* @return the permitted classes, or an empty list if there are none
*
* @since 15
* @since 17
*/
@jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
reflective=true)
default List<? extends TypeMirror> getPermittedSubclasses() {
return List.of();
}

0 comments on commit 31b98e1

Please sign in to comment.