public class AbstractDateFormatSpecifier extends FormatSpecifier
Joda Time is used for
date and time parsing: it can handle all defined formats, and catches more
errors than the standard JDK's SimpleDateFormat does.
What's more, unlike SimpleDateFormat, Joda Time's
DateTimeFormatter is thread-safe!
| Modifier and Type | Field and Description |
|---|---|
private DateTimeFormatter |
dtf
The
DateTimeFormatter to use |
private String |
errmsg
The error message in case of validation failure
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDateFormatSpecifier(String fmt,
String desc)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkValue(List<String> messages,
JsonNode instance)
Abstract method implemented by all specifiers
|
validateprivate final String errmsg
private final DateTimeFormatter dtf
DateTimeFormatter to usefinal void checkValue(List<String> messages, JsonNode instance)
FormatSpecifierIt is only called if the value type is one expected by the
specifier, see FormatSpecifier.validate(List, JsonNode).
checkValue in class FormatSpecifiermessages - the list of messages to fillinstance - the value to validateCopyright © 2012. All Rights Reserved.