[lworld] RFR: 8287692: Move Class primitive APIs to jdk.internal.value.PrimitiveClass
Roger Riggs
rriggs at openjdk.java.net
Fri Jun 3 19:20:53 UTC 2022
On Fri, 3 Jun 2022 19:07:52 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> To avoid confusion with the reflection support for [Value Objects](https://bugs.openjdk.java.net/browse/JDK-8277163)
> the java.lang.Class APIs in support of JEP 401 (Primitive Objects) should be hidden.
>
> The methods `Class.asValueType`, `asPrimaryType`, `isPrimaryType`, `isPrimitiveClass`, and `asPrimitiveValueType`
> are moved to be static methods of `jdk.internal.value.PrimitiveClass`.
>
> To access those methods, add `--exports java.base/jdk.internal.value:+open` to the command line
> in addition to other flags needed to enable Primitive Objects and convert to invoke them as static methods with the class.
>
> The openjdk classes and tests are modified to use the alternate API.
p.s. there are more Hotspot tests to update...
-------------
PR: https://git.openjdk.java.net/valhalla/pull/704
More information about the valhalla-dev
mailing list