Invoke method with an array parameter using reflection

后端 未结 3 1497
不知归路
不知归路 2021-01-17 11:25

I am attempting to write a method the executes a static method from another class by passing an array of strings as arguments to the method.

Here\'s what I have:

3条回答
  •  轮回少年
    2021-01-17 11:58

    Based on this question, it looks like the call should be

     method.invoke(null, command);
    

提交回复
热议问题