@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,
ChronoExtension| Modifier and Type | Optional Element and Description |
|---|---|
String |
format
Returns the associated format pattern symbol in the standard
format context.
|
String |
standalone
Returns the associated format pattern symbol in the stand-alone
context.
|
public 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.
The default value of an empty string means that the associated element is not primarily designed for formatting via a pattern expression.
OutputContext.FORMATpublic abstract String standalone
Returns the associated format pattern symbol in the stand-alone context.
Almost equivalent to format() with the difference that
the element shall be formatted in a stand-alone context (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.
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.STANDALONECopyright © 2014–2015. All rights reserved.