@Deprecated public class MFFunctionRegistry extends 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 |
MFFunctionRegistry.Builder
Deprecated.
This API is for technology preview only.
|
Modifier and Type | Method and Description |
---|---|
static MFFunctionRegistry.Builder |
builder()
Deprecated.
This API is for technology preview only.
|
String |
getDefaultFormatterNameForType(Class<?> clazz)
Deprecated.
This API is for technology preview only.
|
Set<Class<?>> |
getDefaultFormatterTypes()
Deprecated.
This API is for technology preview only.
|
FormatterFactory |
getFormatter(String formatterName)
Deprecated.
This API is for technology preview only.
|
Set<String> |
getFormatterNames()
Deprecated.
This API is for technology preview only.
|
SelectorFactory |
getSelector(String selectorName)
Deprecated.
This API is for technology preview only.
|
Set<String> |
getSelectorNames()
Deprecated.
This API is for technology preview only.
|
@Deprecated public static MFFunctionRegistry.Builder builder()
@Deprecated public FormatterFactory getFormatter(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 Set<String> getFormatterNames()
FormatterFactory
.@Deprecated public String getDefaultFormatterNameForType(Class<?> clazz)
clazz
.clazz
- the class of the object to format.null
otherwise.@Deprecated public Set<Class<?>> getDefaultFormatterTypes()
@Deprecated public SelectorFactory getSelector(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 Set<String> getSelectorNames()
SelectorFactory
.Copyright © 2016 Unicode, Inc. and others.