public static class Formats.AnnotationNonEmptyFormatter extends Formatters.AnnotationFormatter<Formats.NonEmpty,String>
@NonEmpty
annotation.Constructor and Description |
---|
AnnotationNonEmptyFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
parse(Formats.NonEmpty annotation,
String text,
Locale locale)
Binds the field - constructs a concrete value from submitted data.
|
String |
print(Formats.NonEmpty annotation,
String value,
Locale locale)
Unbinds this field - converts a concrete value to plain string
|
public String parse(Formats.NonEmpty annotation, String text, Locale locale) throws ParseException
parse
in class Formatters.AnnotationFormatter<Formats.NonEmpty,String>
annotation
- the annotation that triggered this formattertext
- the field textlocale
- the current Locale
ParseException
- when the text could not be parsedpublic String print(Formats.NonEmpty annotation, String value, Locale locale)
print
in class Formatters.AnnotationFormatter<Formats.NonEmpty,String>
annotation
- the annotation that triggered this formattervalue
- the value to unbindlocale
- the current Locale