Class parameters[] = {Collection.class, TimeSpan.class}; Object arguments[] = {pgInputs, projectSpan}; Method m = null; try { m = supplyClassPG.getMethod("getParameterSchedule", parameters); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace();
if(projectSpan.getEndTime() <= projectSpan.getStartTime()) { logger.error("Was going to call getParameterSchedule, but the projectSpan spans a zero time span!");
  public Schedule getParameterSchedule(PropertyGroup pg,                                       Collection pgInputs,                                       TimeSpan projectSpan) {    Schedule paramSchedule = null;    Class parameters[] = {Collection.class, TimeSpan.class};    Object arguments[] = {pgInputs, projectSpan};    Method m = null;    try {      m = supplyClassPG.getMethod("getParameterSchedule", parameters);    } catch (NoSuchMethodException e) {      e.printStackTrace();    } catch (SecurityException e) {      e.printStackTrace();    }    try {      paramSchedule = (Schedule) m.invoke(pg, arguments);      return paramSchedule;    } catch (IllegalAccessException e) {      e.printStackTrace();    } catch (IllegalArgumentException e) {      e.printStackTrace();    } catch (InvocationTargetException e) {      e.printStackTrace();    }    return new ScheduleImpl();  }