RFR 8223349: [lworld] Reflection support on static <init> factory methods for inline types
Roger.Riggs at oracle.com
Fri May 31 19:13:42 UTC 2019
A minor update to make the test code checking constructors more generic
and used for
Point, Line, and NonFlattenedValue. It only checked the signatures, but
does not invoke each constructor.
On 05/31/2019 02:14 PM, Roger Riggs wrote:
> Hi Mandy,
> 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.
> Thanks, Roger
>> 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