Closed
Description
In the latest JEP401, a "regulated" constructor is introduced:
The constructor of a value class is regulated, meaning that its body must not make any use of this, except to write to an instance field. This ensures a value object does not "escape" to the rest of the program during construction.
More details can be found in the JEP.
The regulated constructor will be represented by modifier 0x0800
in the class file.
Class format check should fail if a value class defines a non-regulated constructor. RT verification may need to be updated as well.