[lworld] RFR: 8287692: Move Class primitive APIs to jdk.internal.value
Roger Riggs
rriggs at openjdk.java.net
Fri Jun 3 19:15:36 UTC 2022
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.
-------------
Commit messages:
- 8287692-only-value-classes: Move Class primitive APIs to jdk.internal.value.
Changes: https://git.openjdk.java.net/valhalla/pull/704/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=704&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8287692
Stats: 526 lines in 58 files changed: 274 ins; 28 del; 224 mod
Patch: https://git.openjdk.java.net/valhalla/pull/704.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/704/head:pull/704
PR: https://git.openjdk.java.net/valhalla/pull/704
More information about the valhalla-dev
mailing list