Java method call with variable length argument (varags) from jython

I am trying to test some Java code with Jython, but I am stuck with a constructor that uses the syntax ... varags.

I tried:

MyConstructor(normal_arg, foo1, foo2) MyConstructor(normal_arg, [foo1, foo2]) MyConstructor(normal_arg, array([foo1, foo2], footype)) 

But none of those who worked (edit: sorry, No. 2 and 3 really work!). How can I do that?

+4
source share
1 answer

Ooops, never mind. MyConstructor (normal_arg, [foo1, foo2]) worked, and I read the error incorrectly on another line.

0
source

All Articles