Any solution for Class.getMethod() reflection and autoboxing?

后端 未结 8 1050
一向
一向 2021-02-12 22:16

I want to use

Class.getMethod(String name, Class... parameterTypes)

to find the method I need to invoke with the given parameters, but apparent

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-12 23:00

    Integer.class represents the Integer object type. Integer.TYPE represents the int primitive type. Does that work?

提交回复
热议问题