Convert Kotlin Array to Java varargs

谁说胖子不能爱 提交于 2019-11-27 23:24:26

You should use the "spread operator", which looks like this: *
The spread operator needs to be prefixed to the array argument:

antMatchers(*angularRoutings)

For further information, see the documentation:

When we call a vararg-function, we can pass arguments one-by-one, e.g. asList(1, 2, 3), or, if we already have an array and want to pass its contents to the function, we use the spread operator (prefix the array with *):

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!