On Fri, 10 Jul 2026 18:31:06 GMT, Chen Liang <[email protected]> wrote:
>> In the space of generate-different-source-code-from-a-template solutions, it >> would be possible to have code conditionally emitted for one case but not >> the other. The solution used for JEP 401 currently just uncomments the >> `value` modifier. > > We tried to use annotation processors and discovered that it just introduced > unnecessary hassles and complexities beyond what is required for JEP 401. I > have described the JEP 401 process here; we can tweak this document if we do > tweak this pipeline in the future. I understand some of the history for the transitory use of annotation processors, but the readers of this document might have not that history (and might not care about it either ;-) ). Given that the general shape of the solution is "we have generating preview-specific versions of source files which get compiled into preview-specific class files," the current mechanism we are choosing to do the generation has very limited functionality, which is sufficient for the purposes at hand. However, that mechanism is less capable than several analagous mechanisms elsewhere in the JDK build. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2633#discussion_r3561261040
