RFR: JDK-6361826: (reflect) provide method for mapping strings to class object for primitive types
Mandy Chung
mchung at openjdk.org
Sat Jul 1 00:11:02 UTC 2023
On Fri, 30 Jun 2023 20:57:54 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Going over some old issues and found this RFE, posting without any tests or a CSR first to get some feedback on the overall API.
An alternative is to extend `ClassDesc::of` to accept the name of primitive types:
ClassDesc.of("int").resolveConstantDesc(MethodHandles.publicLookup());
equivalent to:
ClassDesc.ofDescriptor("I").resolveConstantDesc(MethodHandles.publicLookup()); // currently supported
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14743#issuecomment-1615290274
More information about the core-libs-dev
mailing list