Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments() would

2018-06-10 Thread Rony G. Flatscher
ion kicks in in the javac. > MethodHandle.invokeWithArguments therefore takes > an array with 1 element (the element being 'elements' array) and tries to > invoke the underlying > asList method with it. This time it observes that the method is not a varargs > method, (because >

Suggestion (Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArgum

2018-06-12 Thread Rony G. Flatscher
tain by unreflect should give you the same behavior of > MH.invokeWithArguments() as using > Method.invoke(). ... cut ... On 11.06.2018 16:37, Rony G. Flatscher wrote: ... cut ... > Indeed, this seems to solve the problem, which is really great as this > problem can be put to rest

Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments() would

2018-06-08 Thread Rony G. Flatscher
On 11.03.2018 20:22, Rony G. Flatscher wrote: > Well, still trying to find out what the reason is, that core reflection's > invoke behaves > differently to MethodHandle's invokeWithArguments in one single case so far > (using the method > java.utli.Arrays.asList(...)). > >

Solved (Re: A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments

2018-06-11 Thread Rony G. Flatscher
Hi Peter, once more: thank you very much for your explanations, efforts and patience! :) On 10.06.2018 17:04, Peter Levart wrote: > I showed you some code samples in Java language, so I had to explain what > java compiler is doing > too, for you to fully understand what's going on. You see,

A pure Java example with reflective access behaving differently with invokeWithArguments() compared to core reflection's invoke() (Re: Strange observation: MethodHandle.invokeWithArguments() would not

2018-03-11 Thread Rony G. Flatscher
Well, still trying to find out what the reason is, that core reflection's invoke behaves differently to MethodHandle's invokeWithArguments in one single case so far (using the method java.utli.Arrays.asList(...)). Here is a little Java program that excercises reflective access to

Re: Strange observation: MethodHandle.invokeWithArguments() would not work, whereas Method.invoke() would with the very same arguments

2018-03-08 Thread Rony G. Flatscher
h Arrays.stream(array) each time a stream is needed. It is as if the object returned by Arrays.asList(...) is being handled differently if using the core reflection invoke(...) compared to using MethodHandle.invokeWithArguments(...) for unknown reasons (the arguments are processed the same in b

Re: Strange observation: MethodHandle.invokeWithArguments() would not work, whereas Method.invoke() would with the very same arguments

2018-03-03 Thread Rony G. Flatscher
John, thank you very much for your kind reply and hints! On 02.03.2018 02:47, John Rose wrote: > On Feb 12, 2018, at 11:59 AM, Rony G. Flatscher <rony.flatsc...@wu.ac.at > <mailto:rony.flatsc...@wu.ac.at>> wrote: >> >> While testing a rather complex one (an adapt

Re: Strange observation: MethodHandle.invokeWithArguments() would not work, whereas Method.invoke() would with the very same arguments

2018-03-04 Thread Rony G. Flatscher
it run with both, the core reflection and the MethodHandle invocation versions. ---rony On 03.03.2018 19:02, Rony G. Flatscher wrote: > John, thank you very much for your kind reply and hints! > > On 02.03.2018 02:47, John Rose wrote: >> On Feb 12, 2018, at 11:59 AM, Rony G.