public void configurePhaseListeners(ArrayList<PhaseListener> list) {
   try {
     for (int i = 0; i < _phaseListenerList.size(); i++)
       list.add((PhaseListener) _phaseListenerList.get(i).newInstance());
   } catch (RuntimeException e) {
     throw e;
   } catch (Exception e) {
     throw ConfigException.create(e);
   }
 }
示例#2
0
文件: DateType.java 项目: dlitz/resin
  /**
   * Returns the type's configured value
   *
   * @param builder the context builder
   * @param node the configuration node
   * @param parent
   */
  @Override
  public Object valueOf(String text) {
    try {
      if (text == null) return null;
      else if ("".equals(text)) return new Date(Alarm.getCurrentTime());

      QDate date = new QDate();
      date.parseDate(text);

      return new Date(date.getGMTTime());
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
  }