RFR: JDK-8227046: compiler implementation for sealed classes, JDK-8227047: Javadoc for sealed types and JDK-8227044: javax.lang.model for sealed classes
Joe Darcy
joe.darcy at oracle.com
Thu May 21 05:21:13 UTC 2020
Hi Vicente,
In PrintingProcessor, I believe the printModifers method should remove
"SEALED" from an enum, assuming the latest policy for enums discussed in
the JLS is implemented (tl;dr -- all enums that cannot be implicitly
final are implicitly sealed).
In test/langtools/tools/javac/processing/model/element/TestSealed.java,
List<String> expected might be better constructor from a text block.
Since SealedClassesProcessor extends JavacTestingAbstractProcessor, it
doesn't need to have be annotated with @SupportedAnnotationTypes("*") or
have a getSupportedSourceVersion method which returns latest since that
is built-into the parent class.
Thanks,
-Joe
On 5/18/2020 3:42 PM, Vicente Romero wrote:
> Hi,
>
> Please review this patch for the compiler, javadoc and
> javax.lang.model support for the JEP 360 Sealed Classes (Preview). The
> changes are provided at [1], which implements the latest JLS for
> sealed types [2]. The patch also include the needed changes to javadoc
> and javax.lang.model to support sealed types. The CSR witht the
> changes in the javax.lang.model spec is at [3]. The sealed types JEP
> is accessible at [4]. There is an ongoing review for the VM and
> core-libs code of sealed types [5] and that code hasn't been included
> in this webrev,
>
> Thanks,
> Vicente
>
> [1] http://cr.openjdk.java.net/~vromero/8227046/webrev.00/
> [2]
> http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200513/specs/sealed-classes-jls.html
>
> [3] https://bugs.openjdk.java.net/browse/JDK-8244367
> [4] https://openjdk.java.net/jeps/360
> [5]
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-May/066440.html
More information about the compiler-dev
mailing list