8315458: Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview)

Reviewed-by: jlahoda, mcimadamore, vromero, rriggs, alanb, mchung
This commit is contained in:
Jim Laskey 2023-11-30 12:49:49 +00:00
parent 03759e892d
commit 04ad98ed32
48 changed files with 612 additions and 664 deletions

View file

@ -177,12 +177,11 @@ public interface Filer {
* <p>Creating a source file in or for an <em>unnamed</em> package in a <em>named</em>
* module is <em>not</em> supported.
*
* <p>If the environment is configured to support {@linkplain
* TypeElement#isUnnamed unnamed classes}, the name argument is
* used to provide the leading component of the name used for the
* output file. For example {@code filer.createSourceFile("Foo")}
* to create an unnamed class hosted in {@code Foo.java}. All
* unnamed classes must be in an unnamed package.
* <p>If the environment is configured to support implicitly declared
* classes, the name argument is used to provide the leading component of the
* name used for the output file. For example {@code filer.createSourceFile("Foo")}
* to create an implicitly declared class hosted in {@code Foo.java}. All
* implicit classes must be in an unnamed package.
*
* @apiNote To use a particular {@linkplain
* java.nio.charset.Charset charset} to encode the contents of the
@ -263,12 +262,11 @@ public interface Filer {
* <p>Creating a class file in or for an <em>unnamed</em> package in a <em>named</em>
* module is <em>not</em> supported.
*
* <p>If the environment is configured to support {@linkplain
* TypeElement#isUnnamed unnamed classes}, the name argument is
* used to provide the leading component of the name used for the
* output file. For example {@code filer.createClassFile("Foo")} to
* create an unnamed class hosted in {@code Foo.class}. All unnamed
* classes must be in an unnamed package.
* <p>If the environment is configured to support implicitly declared
* classes, the name argument is used to provide the leading component of the
* name used for the output file. For example {@code filer.createSourceFile("Foo")}
* to create an implicitly declared class hosted in {@code Foo.java}. All
* implicit classes must be in an unnamed package.
*
* @apiNote To avoid subsequent errors, the contents of the class
* file should be compatible with the {@linkplain