Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 49 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4a34a4e
Implicit classes and instance main methods
Oct 31, 2023
a07b8d2
Remove obsolete tests
Nov 1, 2023
b98e40f
Remove .orig files
Nov 2, 2023
2bb3047
Remove MANDATED flag from implicit classes
Nov 2, 2023
05945eb
Update JEP number in PreviewFeature
Nov 2, 2023
edbe208
Don't store main method info globally. Use addition calls to fetch info.
Nov 2, 2023
7c92e85
Revised implicit class test
Nov 2, 2023
afdd078
Changes recommended by Jan
Nov 2, 2023
742fed7
Requested corrections
Nov 2, 2023
72033bc
Remove unnamed classes from examples.not-yet.txt
Nov 2, 2023
4b3c03f
Don't get args unless necessary
Nov 3, 2023
0bd5b47
Merge remote-tracking branch 'upstream/master' into 8315458
Nov 3, 2023
3ffff0d
Rename unnamed class tests and examples
Nov 6, 2023
7effbcf
Merge remote-tracking branch 'upstream/master' into 8315458
Nov 7, 2023
d3581d8
Update launch comments
Nov 7, 2023
338d63c
Clean up exception checks
Nov 8, 2023
f65efb0
Misspelling
Nov 8, 2023
0fb43a5
Update tests
Nov 8, 2023
8fedc67
Update LauncherHelper.java
Nov 10, 2023
1bf935f
Simplified and compatible main method finding
Nov 10, 2023
abf4881
Clean up previous commit
Nov 11, 2023
dd6703e
Reinstate test
Nov 11, 2023
701ba84
Filter abstract main methods and search interfaces for default main m…
Nov 14, 2023
598553f
Update comment in Filer.java to include implicitly declared classes
Nov 16, 2023
889f3ec
Allow nested class of same name as file
Nov 17, 2023
75f1e82
getMainMethod
Nov 18, 2023
468a20a
Update Class.java
Nov 18, 2023
90d4d1c
Clean up getMainMethod
Nov 19, 2023
8ef55fd
Add getMainMethod Test
Nov 19, 2023
27de4fe
Additional tests for getMainMethod
Nov 19, 2023
c5992d5
Move Implicitly Declared Classes to single directory
Nov 20, 2023
5542947
Add nested class test
Nov 20, 2023
abe35d5
Update findMainMethod as requested
Nov 20, 2023
b14c6a5
Update test
Nov 20, 2023
fd0c92f
Update Class.java
Nov 21, 2023
222e334
Handle javadoc on top level elements properly
Nov 22, 2023
420f6b4
Move findMainMethod to non-public access
Nov 23, 2023
690dac1
Remove Test
Nov 23, 2023
d7895da
Requested changes
Nov 24, 2023
daacc0b
Merge remote-tracking branch 'upstream/master' into 8315458
Nov 28, 2023
f313cc9
Update Class.java comment
Nov 28, 2023
c4fc2f9
Create TestImplicitClass.java
Nov 28, 2023
6ce7c84
Merge remote-tracking branch 'upstream/master' into 8315458
Nov 28, 2023
0d01c48
Requested changes
Nov 28, 2023
3017040
Add comments to invokeXXXX functions
Nov 28, 2023
2f7fdde
Windows line endings
Nov 29, 2023
cafc4db
Update test/jdk/tools/launcher/InstanceMainTest.java
Nov 29, 2023
7ed4045
Update test/jdk/tools/launcher/InstanceMainTest.java
Nov 29, 2023
cb0ed86
Correct comments
Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -177,6 +177,12 @@ 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 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
* file, an {@code OutputStreamWriter} with the chosen charset can
@@ -256,6 +262,12 @@ JavaFileObject createSourceFile(CharSequence name,
* <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 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
* ProcessingEnvironment#getSourceVersion source version} being