Method.invoke()Constructor.newInstance()에 제공된 인수가 Class.getMethod()Class.getConstructor()에 지정된 시그니처와 일치하지 않는 경우를 보고합니다.

예:


  Method m = myObj.getClass().getMethod("myMethod", int.class);
  // 인수는 int 값이어야 합니다
  m.invoke(myObj, "abc");

2017.2의 새로운 기능