public class TimeFormatHelper extends AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
DateTimeFormatHelper
which makes use of java.time
package in JDK 8 (JSR-310). It supports new temporal types and should also be
less resource-intensive.VALUE_TAG_TYPES
HELPER_TAG_TYPES
configuration
Constructor and Description |
---|
TimeFormatHelper() |
Modifier and Type | Method and Description |
---|---|
protected String |
defaultFormat(TemporalAccessor value,
Locale locale,
TimeZone timeZone) |
protected String |
format(TemporalAccessor value,
FormatStyle style,
Locale locale,
TimeZone timeZone) |
protected String |
format(TemporalAccessor value,
String pattern,
Locale locale,
TimeZone timeZone) |
protected TemporalAccessor |
getFormattableObject(Object value,
Locale locale,
TimeZone timeZone,
MustacheTagInfo tagInfo) |
protected void |
init()
Can be overridden so that there's no need to call
super.init(Configuration) . |
protected FormatStyle |
parseStyle(String style,
MustacheTagInfo tagInfo) |
execute, getSupportedHashKeys, getTimeZone, unknownStyle, valueNotAFormattableObject
getCurrentLocale, getCurrentLocale, getLocale
allowedTagTypes
getRequiredHashKeys, numberOfRequiredHashEntries, numberOfRequiredParameters, validate
append, convertAndAppend, convertValue, isSection, isUnescapeVariable, isVariable
checkNotInitialized, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfigurationKeys, init
protected void init()
AbstractConfigurationAware
super.init(Configuration)
.init
in class LocaleAwareValueHelper
protected String defaultFormat(TemporalAccessor value, Locale locale, TimeZone timeZone)
defaultFormat
in class AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
protected String format(TemporalAccessor value, FormatStyle style, Locale locale, TimeZone timeZone)
format
in class AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
protected String format(TemporalAccessor value, String pattern, Locale locale, TimeZone timeZone)
format
in class AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
protected FormatStyle parseStyle(String style, MustacheTagInfo tagInfo)
parseStyle
in class AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
protected TemporalAccessor getFormattableObject(Object value, Locale locale, TimeZone timeZone, MustacheTagInfo tagInfo)
getFormattableObject
in class AbstractTimeFormatHelper<TemporalAccessor,FormatStyle>
Copyright © 2017. All rights reserved.