Package org.eweb4j.mvc.action.annotation

Examples of org.eweb4j.mvc.action.annotation.DateFormat


    return paramValue;
  }

  private Date getDateParam(Annotation[] anns, String paramValue)
      throws Exception {
    DateFormat dateAnn = null;
    for (Annotation a : anns) {
      if (a == null)
        continue;

      if (!a.annotationType().isAssignableFrom(DateFormat.class))
        continue;

      dateAnn = (DateFormat) a;
      break;
    }

    String pattern = "yyyy-MM-dd HH:mm:ss";
    if (dateAnn != null)
      pattern = dateAnn.value();

    SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    return sdf.parse(paramValue);
  }
View Full Code Here

TOP

Related Classes of org.eweb4j.mvc.action.annotation.DateFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.