자바·JSP2011. 4. 18. 20:29

 public String callService(DflCallServiceParam param)
 throws InstantiationException, IllegalAccessException, ClassNotFoundException, InvocationTargetException, RemoteException, NoSuchMethodException {
    
  UiServiceImpl obj = new UiServiceImpl();
  String result = "";
  int mc;
  
  Class oClass = obj.getClass();
     Method[] methods = oClass.getDeclaredMethods();
    
        for(int i=0; i < methods.length; i++)
        {
         if(param.getMid().equals(methods[i].getName()));
         {
          mc = i;
         }
        }
       
        Method method = oClass.getDeclaredMethod(param.getMid(), new Class[]{new String().getClass()});
        Ret ret = (Ret)method.invoke(obj, new Object[]{new String("aaa")});

  return result;
 }

Posted by 미랭군