While the official ways to convert Class and MethodType to ClassDesc and MethodTypeDesc are to call .decribeConstable().orElseThrow() or through descriptor strings, in java.base, we have many scenarios (mostly in ClassFile generation) where we know we don't have hidden classes and can always trust our inputs. Such conversions will be handled by new methods in ConstantUtils, so it will be easier for us to optimize implementation across the board later.
- links to
-
Commit openjdk/jdk/8d2f9e57
-
Review(master) openjdk/jdk/19585