Spring框架学习[Spring HTTP调用器实现远程调用](三)

2014-11-24 03:00:37 · 作者: · 浏览: 2
ject invoke(Object targetObject)
  • throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { //获取远程调用对象的方法名称和参数类型
  • Method method = targetObject.getClass().getMethod(this.methodName, this.parameterTypes); //利用JDK反射机制,调用目标对象指定参数的方法
  • return method.invoke(targetObject, this.arguments); }