play.data.format
Class Formats.AnnotationNonEmptyFormatter
java.lang.Object
play.data.format.Formatters.AnnotationFormatter<Formats.NonEmpty,java.lang.String>
play.data.format.Formats.AnnotationNonEmptyFormatter
- Enclosing class:
- Formats
public static class Formats.AnnotationNonEmptyFormatter
- extends Formatters.AnnotationFormatter<Formats.NonEmpty,java.lang.String>
Annotation formatter, triggered by the @NonEmpty
annotation.
Method Summary |
java.lang.String |
parse(Formats.NonEmpty annotation,
java.lang.String text,
java.util.Locale locale)
Binds the field - constructs a concrete value from submitted data. |
java.lang.String |
print(Formats.NonEmpty annotation,
java.lang.String value,
java.util.Locale locale)
Unbinds this field - converts a concrete value to plain string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Formats.AnnotationNonEmptyFormatter
public Formats.AnnotationNonEmptyFormatter()
parse
public java.lang.String parse(Formats.NonEmpty annotation,
java.lang.String text,
java.util.Locale locale)
throws java.text.ParseException
- Binds the field - constructs a concrete value from submitted data.
- Specified by:
parse
in class Formatters.AnnotationFormatter<Formats.NonEmpty,java.lang.String>
- Parameters:
annotation
- the annotation that trigerred this formattertext
- the field textlocale
- the current Locale
- Returns:
- a new value
- Throws:
java.text.ParseException
print
public java.lang.String print(Formats.NonEmpty annotation,
java.lang.String value,
java.util.Locale locale)
- Unbinds this field - converts a concrete value to plain string
- Specified by:
print
in class Formatters.AnnotationFormatter<Formats.NonEmpty,java.lang.String>
- Parameters:
annotation
- the annotation that trigerred this formattervalue
- the value to unbindlocale
- the current Locale
- Returns:
- printable version of the value