You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains an implementation of the module-info parser using the Java Class File API, which was introduced as a preview feature in Java 22 (JEP 457).
4
+
5
+
## Background
6
+
7
+
The Class File API provides a native Java API for parsing and generating class files, eliminating the need for external libraries like ASM for this purpose.
-**Java 24** (March 2025): Expected to be finalized (JEP 484) - no preview flag needed
14
+
15
+
## Implementation
16
+
17
+
This implementation uses:
18
+
-`java.lang.classfile.ClassFile` for parsing class files
19
+
-`java.lang.classfile.attribute.ModuleAttribute` for accessing module information
20
+
- The same `JavaModuleDescriptor` builder pattern as other implementations
21
+
22
+
## Building
23
+
24
+
When building with Java 22 or 23, the `--enable-preview` flag is automatically added by the Maven compiler plugin configuration.
25
+
26
+
When building with Java 24+, the preview flag should not be needed as the API should be finalized.
27
+
28
+
When building with Java 17 or earlier, this code is not compiled, and the Java 9 implementation (using `java.lang.module.ModuleDescriptor`) is used instead.
29
+
30
+
## Multi-Release JAR
31
+
32
+
This implementation is part of a multi-release JAR structure:
0 commit comments