RFR 8223349: [lworld] Reflection support on static <init> factory methods for inline types
Roger.Riggs at oracle.com
Fri May 31 18:14:08 UTC 2019
On 05/31/2019 12:59 PM, Mandy Chung wrote:
> Hi Roger,
> line 185 and 190, these 2 methods create a new instance of a given
> class which is not necessarily Point class. Perhaps simply take out
> this println.
> Is there a test for checking getDeclaredConstructor(s) to find the
> static init factory and verify that invocation produces an expected
> inline value?
Added a test for pointConstructors; probably a bit sensitive to the
exact constructors declared in Point.
It needs a more comprehensive/flexible test when API changes settle down.
> FYI. I find a few issues in java.lang.invoke in looking up and
> unreflect the static init factory and working on a patch for it. I
> will take care of the new tests for Lookup::findConstructor,
> findStatic, unreflectConstructor etc.
> On 5/30/19 7:53 AM, Roger Riggs wrote:
>> Please review changes to java.lang.reflection for inline classes to
>> support lookup and invocation
>> of constructors (static method <init>).
>> The changes to MethodHandles.Lookup appear to already been done.
>> Thanks, Roger
More information about the valhalla-dev