public class MessageFormatCache extends Object
MessageFormat objects.
Since only a small subset of MessageFormats are generally used by
SingleFieldAppendingMarker, the MessageFormatCache will
cache them (per thread) so that they can be reused.
This is a performance optimization to save MessageFormat construction and parsing time
for each argument/marker.
| Modifier and Type | Field and Description |
|---|---|
static MessageFormatCache |
INSTANCE |
| Constructor and Description |
|---|
MessageFormatCache() |
| Modifier and Type | Method and Description |
|---|---|
MessageFormat |
getMessageFormat(String formatPattern) |
public static final MessageFormatCache INSTANCE
public MessageFormat getMessageFormat(String formatPattern)
Copyright © 2013–2021. All rights reserved.