Calling Java Method with variable length argument (varags) from jython [closed]
I'm trying to test some Java code with Jython, but I'm stuck with a constructor that uses the ... varags syntax.
I tried these:
MyConstructor(normal_arg, foo1, foo2)
MyConstructor(normal_arg, [foo1, foo2])
MyConstructor(normal_arg, array([foo1, foo2], footype))
But none of those worked (edit: sorry, nr. 2 and 3 do work!). How can it be done?
Oooops, never mind. MyConstructor(normal_arg, [foo1, foo2]) actually worked and I misread an error in another line.
精彩评论