Integrated: 8308753: Class-File API transition to Preview

Adam Sotona asotona at
Mon Dec 4 07:11:11 UTC 2023

On Wed, 13 Sep 2023 09:48:00 GMT, Adam Sotona <asotona at> wrote:

> Classfile API is an internal library under package `jdk.internal.classfile` in JDK 21.
> This pull request turns the Classfile API into a preview feature and moves it into `java.lang.classfile`.
> It repackages all uses across JDK and tests and adds lots of missing Javadoc.
> This PR goes in sync with [JDK-8308754]( Class-File API (Preview) (CSR)
> and [JDK-8280389]( Class-File API (Preview) (JEP).
> Online javadoc is available at: 
> In addition to the primary transition to preview, this pull request also includes:
> - All Classfile* classes ranamed to ClassFile* (based on JEP discussion).
> - A new preview feature, `CLASSFILE_API`, has been added.
> - Buildsystem tool required a little patch to support annotated modules.
> - All JDK modules using the Classfile API are newly participating in the preview.
> - All tests that use the Classfile API now have preview enabled.
> - A few Javac tests not allowing preview have been partially reverted; their conversion can be re-applied when the Classfile API leaves preview mode.
> Despite the number of affected files, this pull request is relatively straight-forward. The preview version of the Classfile API is based on the internal version of the library from the JDK master branch, and there are no API features added.
> Please review this pull request to help the Classfile API turn into a preview.
> Any comments are welcome.
> Thanks,
> Adam

This pull request has now been integrated.

Changeset: 2b00ac0d
Author:    Adam Sotona <asotona at>
Stats:     32362 lines in 787 files changed: 14660 ins; 14113 del; 3589 mod

8308753: Class-File API transition to Preview

Reviewed-by: ihse, mchung, vromero



More information about the compiler-dev mailing list