class CronUtils {

  public static List<Date> getSelfFireDateList(Date startTime, Date endTime, CronExpression cronExpression,int fireTimes) {
    List<Date> dateList = new ArrayList<>();
    while (fireTimes > 0) {
      startTime = cronExpression.getNextValidTimeAfter(startTime);
      if (startTime.after(endTime) || startTime.equals(endTime)) {
        break;
      }
      dateList.add(startTime);
      fireTimes--;
    }

    return dateList;
  }

  private  CronUtils();

}