开发者

Calling Java Method with variable length argument (varags) from jython [closed]

This question is unlikely to help an开发者_StackOverflow社区y future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜