@Documented @Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) public @interface FormattableElement
This Annotation can be used to document all chronological
elements which allow formatted representations.
Usage note: Usually only element constants with the modifiers
static und final are target of this Annotation.
The target type ElementType.METHOD is only permitted if
elements are generated in a ChronoExtension.
ChronoElement,
ChronoExtensionpublic abstract String format
Returns the associated format pattern symbol in the standard format context.
Format pattern symbols should be unique among all registered elements of a given chronology. In standard elements they correspond to the format symbols defined by unicode organization in CLDR. The symbol is case-sensitive.
OutputContext.FORMATpublic abstract String alt
Returns the alternative format pattern symbol.
Almost equivalent to format() with the difference that the
element shall be formatted in a stand-alone context in CLDR (for example
nominative form "x January" instead of the ordinal form
"x-th January"). However, the stand-alone context is not
relevant for English - as "January" is still the same word,
only relevant for some languages which make an explicit grammar
difference.
When used in dynamic pattern style, this alternative usually denotes the small letter for numeric formatting - in contrast to the standard big letter which also allows for textual formatting.
The default value of an empty string just means that the stand-alone context should use the same value as in the format context.
OutputContext.STANDALONEpublic abstract boolean dynamic
Defines a dynamic pattern symbol.
Dynamic pattern symbols are not handled by CLDR but are resolved by a dynamic element search.
PatternType.DYNAMICCopyright © 2014–2021. All rights reserved.