Package play.data.binding
Class AnnotationHelper
- java.lang.Object
-
- play.data.binding.AnnotationHelper
-
public class AnnotationHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AnnotationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Date
getDateAs(java.lang.annotation.Annotation[] annotations, java.lang.String value)
It can be something like As(lang={"fr,de","*"}, value={"dd-MM-yyyy","MM-dd-yyyy"})static play.data.binding.AnnotationHelper.Tuple
getLocale(java.lang.String[] langs)
-
-
-
Method Detail
-
getDateAs
public static java.util.Date getDateAs(java.lang.annotation.Annotation[] annotations, java.lang.String value) throws java.text.ParseException
It can be something like As(lang={"fr,de","*"}, value={"dd-MM-yyyy","MM-dd-yyyy"})- Parameters:
annotations
- Annotations associated with on the datevalue
- The formated date- Returns:
- null if it cannot be converted because there is no annotation.
- Throws:
java.text.ParseException
- if problem occurred during parsing the date
-
getLocale
public static play.data.binding.AnnotationHelper.Tuple getLocale(java.lang.String[] langs)
-
-