Re: Reflection problem with varargs

2020-07-14 Thread Blake McBride
Thanks!! On Tue, Jul 14, 2020 at 2:14 PM Jochen Theodorou wrote: > On 14.07.20 19:55, Blake McBride wrote: > [...] > > static Object myMethod(Object ... args) { > [...] > > Method methp = groovyClass.getMethod("myMethod", ca); > > Object r = methp.invoke(null,4,5); // Here is whe

Re: Reflection problem with varargs

2020-07-14 Thread Jochen Theodorou
On 14.07.20 19:55, Blake McBride wrote: [...] static Object myMethod(Object ... args) { [...] Method methp = groovyClass.getMethod("myMethod", ca); Object r = methp.invoke(null,4,5); // Here is where the error occurs int x =1;// place for a breakpoint [...] At the indicat

Reflection problem with varargs

2020-07-14 Thread Blake McBride
Greetings, I am using Groovy 2.4.15-indy. I am having a problem executing a Groovy function through reflection. Here is the Groovy code: class Example { static Object myMethod(Object ... args) { System.out.println("Hello from groovy!") int r = (Integer) args[0] + (Integer)