Package play.data.format
Class Formatters.AnnotationFormatter<A extends Annotation,T>
java.lang.Object
play.data.format.Formatters.AnnotationFormatter<A,T>
- Type Parameters:
A- the type of the annotationT- the type that this formatter will parse and print
- Direct Known Subclasses:
Formats.AnnotationDateFormatter,Formats.AnnotationNonEmptyFormatter
- Enclosing class:
- Formatters
Super-type for annotation-based formatters.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AnnotationFormatter
public AnnotationFormatter()
-
-
Method Details
-
parse
Binds the field - constructs a concrete value from submitted data.- Parameters:
annotation- the annotation that triggered this formattertext- the field textlocale- the currentLocale- Returns:
- a new value
- Throws:
ParseException- when the text could not be parsed
-
print
Unbind this field (ie. transform a concrete value to plain string)- Parameters:
annotation- the annotation that triggered this formatter.value- the value to unbindlocale- the currentLocale- Returns:
- printable version of the value
-