Deprecated
This API is for technology preview only.
For example to add formatting for a Person object one would need to:
Formatter)FormatterFactory)"person") to the factory...Person.class) to
the formatter name ("person"), so that one can use a placeholder in the message
without specifying a function (for example "... {$me} ..." instead of
"... {$me :person} ...", if the class of $me is an instanceof Person).
| Modifier and Type | Class and Description |
|---|---|
| public static class | Mf2FunctionRegistry.Builder
Deprecated
This API is for technology preview only.
A Builder used to build instances of Mf2FunctionRegistry.
|
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| private | Mf2FunctionRegistry(Mf2FunctionRegistry.
Deprecated
as a consequence of
Mf2FunctionRegistry.Builder being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public static Mf2FunctionRegistry. | Returns: the Builder.
Deprecated
This API is for technology preview only.
Creates a builder.
|
| public String | Returns: the name of the formatter class, if registered. Returnsnull otherwise.the class of the object to format. clazz)
Deprecated
This API is for technology preview only.
Returns the name of the formatter used to format an object of type clazz.
|
| public Set | Returns: a set of all the known classes that have mapping to function names.
Deprecated
This API is for technology preview only.
Get all know classes that have a mappings from class to function name.
|
| public FormatterFactory | Returns: the factory creating formatters forname. Returns null if none is registered.the function name. formatterName)
Deprecated
This API is for technology preview only.
Returns the formatter factory used to create the formatter for function
named name.
|
| public Set | Returns: a set of all the known formatter names.
Deprecated
This API is for technology preview only.
Get all know names that have a mappings from name to FormatterFactory.
|
| public SelectorFactory | Returns: the factory creating selectors forname. Returns null if none is registered.the selector name. selectorName)
Deprecated
This API is for technology preview only.
Returns the selector factory used to create the selector for function
named name.
|
| public Set | Returns: a set of all the known selector names.
Deprecated
This API is for technology preview only.
Get all know names that have a mappings from name to SelectorFactory.
|
| classToFormatter | back to summary |
|---|---|
| private final Map<Class<?>, String> classToFormatter | |
| formattersMap | back to summary |
|---|---|
| private final Map<String, FormatterFactory> formattersMap | |
| selectorsMap | back to summary |
|---|---|
| private final Map<String, SelectorFactory> selectorsMap | |
| Mf2FunctionRegistry | back to summary |
|---|---|
| private Mf2FunctionRegistry(Mf2FunctionRegistry. Deprecated as a consequence of | |
| builder | back to summary |
|---|---|
| public static Mf2FunctionRegistry. Deprecated This API is for technology preview only. Creates a builder.
| |
| getDefaultFormatterNameForType | back to summary |
|---|---|
| public String getDefaultFormatterNameForType(Class<?> clazz)
Deprecated This API is for technology preview only. Returns the name of the formatter used to format an object of type | |
| getDefaultFormatterTypes | back to summary |
|---|---|
| public Set Deprecated This API is for technology preview only. Get all know classes that have a mappings from class to function name. | |
| getFormatter | back to summary |
|---|---|
| public FormatterFactory getFormatter(String formatterName)
Deprecated This API is for technology preview only. Returns the formatter factory used to create the formatter for function
named Note function name here means the name used to refer to the function in the
MessageFormat 2 syntax, for example For example one might write a
| |
| getFormatterNames | back to summary |
|---|---|
| public Set Deprecated This API is for technology preview only. Get all know names that have a mappings from name to | |
| getSelector | back to summary |
|---|---|
| public SelectorFactory getSelector(String selectorName)
Deprecated This API is for technology preview only. Returns the selector factory used to create the selector for function
named Note the same comments about naming as the ones on
| |
| getSelectorNames | back to summary |
|---|---|
| public Set Deprecated This API is for technology preview only. Get all know names that have a mappings from name to | |
Deprecated
This API is for technology preview only.
Builder used to build instances of Mf2FunctionRegistry.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the registry to copy from. functionRegistry)
Deprecated
This API is for technology preview only.
Adds all the mapping from another registry to this one.
|
| public Mf2FunctionRegistry | Returns: the function registry created.
Deprecated
This API is for technology preview only.
Builds an instance of Mf2FunctionRegistry.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.
Deprecated
This API is for technology preview only.
Remove all the class to formatter-names mappings.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.
Deprecated
This API is for technology preview only.
Remove all the formatter mappings.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.
Deprecated
This API is for technology preview only.
Remove all the selector mappings.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the class to remove the mapping for. clazz)
Deprecated
This API is for technology preview only.
Remove the function name associated with the class.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the name of the formatter to remove. formatterName)
Deprecated
This API is for technology preview only.
Remove the formatter associated with the name.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the name of the selector to remove. selectorName)
Deprecated
This API is for technology preview only.
Remove the selector associated with the name.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the class of the type to format. clazz, String the formatter name (as used in the MessageFormat 2 syntax). formatterName)
Deprecated
This API is for technology preview only.
Adds a mapping from a type to format to a FormatterFactory formatter name.
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the function name (as used in the MessageFormat 2 syntax). formatterName, FormatterFactory the factory that handles the name. formatterFactory)
Deprecated
This API is for technology preview only.
Adds a mapping from a formatter name to a FormatterFactory
|
| public Mf2FunctionRegistry. | Returns: the builder, for fluent use.the function name (as used in the MessageFormat 2 syntax). selectorName, SelectorFactory the factory that handles the name. selectorFactory)
Deprecated
This API is for technology preview only.
Adds a mapping from a selector name to a SelectorFactory
|
| classToFormatter | back to summary |
|---|---|
| private final Map<Class<?>, String> classToFormatter | |
| formattersMap | back to summary |
|---|---|
| private final Map<String, FormatterFactory> formattersMap | |
| selectorsMap | back to summary |
|---|---|
| private final Map<String, SelectorFactory> selectorsMap | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| addAll | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Adds all the mapping from another registry to this one.
| |
| build | back to summary |
|---|---|
| public Mf2FunctionRegistry build()
Deprecated This API is for technology preview only. Builds an instance of
| |
| clearDefaultFormatterNames | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove all the class to formatter-names mappings.
| |
| clearFormatters | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove all the formatter mappings.
| |
| clearSelectors | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove all the selector mappings.
| |
| removeDefaultFormatterNameForType | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove the function name associated with the class.
| |
| removeFormatter | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove the formatter associated with the name.
| |
| removeSelector | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Remove the selector associated with the name.
| |
| setDefaultFormatterNameForType | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Adds a mapping from a type to format to a
| |
| setFormatter | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Adds a mapping from a formatter name to a
| |
| setSelector | back to summary |
|---|---|
| public Mf2FunctionRegistry. Deprecated This API is for technology preview only. Adds a mapping from a selector name to a
| |