@Deprecated
public class Mf2FunctionRegistry
extends java.lang.Object
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 |
---|---|
static class |
Mf2FunctionRegistry.Builder
Deprecated.
This API is for technology preview only.
|
Modifier and Type | Method and Description |
---|---|
static Mf2FunctionRegistry.Builder |
builder()
Deprecated.
This API is for technology preview only.
|
java.lang.String |
getDefaultFormatterNameForType(java.lang.Class<?> clazz)
Deprecated.
This API is for technology preview only.
|
java.util.Set<java.lang.Class<?>> |
getDefaultFormatterTypes()
Deprecated.
This API is for technology preview only.
|
FormatterFactory |
getFormatter(java.lang.String formatterName)
Deprecated.
This API is for technology preview only.
|
java.util.Set<java.lang.String> |
getFormatterNames()
Deprecated.
This API is for technology preview only.
|
SelectorFactory |
getSelector(java.lang.String selectorName)
Deprecated.
This API is for technology preview only.
|
java.util.Set<java.lang.String> |
getSelectorNames()
Deprecated.
This API is for technology preview only.
|
@Deprecated public static Mf2FunctionRegistry.Builder builder()
@Deprecated public FormatterFactory getFormatter(java.lang.String formatterName)
name
.
Note: function name here means the name used to refer to the function in the
MessageFormat 2 syntax, for example "... {$exp :datetime} ..."
The function name here is "datetime"
, and does not have to correspond to the
name of the methods / classes used to implement the functionality.
For example one might write a PersonFormatterFactory
returning a PersonFormatter
,
and map that to the MessageFormat function named "person"
.
The only name visible to the users of MessageFormat syntax will be "person"
.
formatterName
- the function name.name
. Returns null
if none is registered.@Deprecated public java.util.Set<java.lang.String> getFormatterNames()
FormatterFactory
.@Deprecated public java.lang.String getDefaultFormatterNameForType(java.lang.Class<?> clazz)
clazz
.clazz
- the class of the object to format.null
otherwise.@Deprecated public java.util.Set<java.lang.Class<?>> getDefaultFormatterTypes()
@Deprecated public SelectorFactory getSelector(java.lang.String selectorName)
name
.
Note: the same comments about naming as the ones on getFormatter
apply.
selectorName
- the selector name.name
. Returns null
if none is registered.getFormatter(String)
@Deprecated public java.util.Set<java.lang.String> getSelectorNames()
SelectorFactory
.Copyright ? 2016 Unicode, Inc. and others.