On Fri, 27 Feb 2026 11:37:12 GMT, David Beaumont <[email protected]> wrote:

> Adds a new AnnotationProcessor to read the @MigratedValueClass on prospective 
> value classes and generate the equivalent source file with the 'value' 
> keyword at each annotated class declaration.
> 
> This adds new PROCESSOR_PATH variable to the compilation macro and use it for 
> annotation processing.
> This also requires moving the plugin discovery path to the new variable (was 
> in classpath before) because the addition of a '--processor-path' flag 
> disables using the classpath for plugin discovery.

An example of output is, given the `Integer.java` source file:

**src/java.base/share/classes/java/lang/Integer.java**

@jdk.internal.MigratedValueClass
@jdk.internal.ValueBased
public final class Integer extends Number


**build/linux-x64/support/gensrc-valueclasses/java.base/java/lang/Integer.java**

@jdk.internal.MigratedValueClass
@jdk.internal.ValueBased
public final value class Integer extends Number

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/2180#issuecomment-3972476375

Reply via email to