static class LocalDateTimeStringConverter.LdtConverter<T extends java.time.temporal.Temporal> extends StringConverter<T>
| Modifier and Type | Field and Description |
|---|---|
(package private) java.time.chrono.Chronology |
chronology |
(package private) java.time.format.FormatStyle |
dateStyle |
(package private) java.time.format.DateTimeFormatter |
formatter |
(package private) java.util.Locale |
locale |
(package private) java.time.format.DateTimeFormatter |
parser |
(package private) java.time.format.FormatStyle |
timeStyle |
private java.lang.Class<T> |
type |
| Constructor and Description |
|---|
LdtConverter(java.lang.Class<T> type,
java.time.format.DateTimeFormatter formatter,
java.time.format.DateTimeFormatter parser,
java.time.format.FormatStyle dateStyle,
java.time.format.FormatStyle timeStyle,
java.util.Locale locale,
java.time.chrono.Chronology chronology) |
| Modifier and Type | Method and Description |
|---|---|
private java.time.format.DateTimeFormatter |
fixFourDigitYear(java.time.format.DateTimeFormatter formatter,
java.time.format.FormatStyle dateStyle,
java.time.format.FormatStyle timeStyle,
java.time.chrono.Chronology chronology,
java.util.Locale locale) |
T |
fromString(java.lang.String text)
Converts the string provided into an object defined by the specific converter.
|
private java.time.format.DateTimeFormatter |
getDefaultFormatter()
Return a default
DateTimeFormatter instance to use for formatting
and parsing in this StringConverter. |
private java.time.format.DateTimeFormatter |
getDefaultParser() |
java.lang.String |
toString(T value)
Converts the object provided into its string form.
|
private java.lang.Class<T extends java.time.temporal.Temporal> type
java.util.Locale locale
java.time.chrono.Chronology chronology
java.time.format.DateTimeFormatter formatter
java.time.format.DateTimeFormatter parser
java.time.format.FormatStyle dateStyle
java.time.format.FormatStyle timeStyle
LdtConverter(java.lang.Class<T> type, java.time.format.DateTimeFormatter formatter, java.time.format.DateTimeFormatter parser, java.time.format.FormatStyle dateStyle, java.time.format.FormatStyle timeStyle, java.util.Locale locale, java.time.chrono.Chronology chronology)
public T fromString(java.lang.String text)
fromString in class StringConverter<T extends java.time.temporal.Temporal>public java.lang.String toString(T value)
toString in class StringConverter<T extends java.time.temporal.Temporal>private java.time.format.DateTimeFormatter getDefaultParser()
private java.time.format.DateTimeFormatter getDefaultFormatter()
Return a default DateTimeFormatter instance to use for formatting
and parsing in this StringConverter.
private java.time.format.DateTimeFormatter fixFourDigitYear(java.time.format.DateTimeFormatter formatter,
java.time.format.FormatStyle dateStyle,
java.time.format.FormatStyle timeStyle,
java.time.chrono.Chronology chronology,
java.util.Locale locale)