@ThreadSafe public class MessageFormatter extends FormatterSupport implements Iterable<Formatter>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MessageFormatter.ParameterAwareFormatter |
protected static class |
MessageFormatter.PassThruFormatter |
protected static class |
MessageFormatter.StaticFormatter |
| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<Object> |
CALLED_VALUE |
| Modifier | Constructor and Description |
|---|---|
protected |
MessageFormatter(Locale locale,
List<Formatter> subFormatter) |
|
MessageFormatter(Locale locale,
String pattern) |
|
MessageFormatter(Locale locale,
String pattern,
FormatterFactory<?>... factories) |
protected |
MessageFormatter(Locale locale,
String pattern,
MessageFormatterFactory root) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
format(Iterable<?> values) |
static String |
format(Locale locale,
String pattern,
Iterable<?> values) |
static String |
format(Locale locale,
String pattern,
Map<?,?> values) |
static String |
format(Locale locale,
String pattern,
Object... values) |
static void |
format(Locale locale,
String pattern,
Writer to,
Iterable<?> values) |
static void |
format(Locale locale,
String pattern,
Writer to,
Map<?,?> values) |
static void |
format(Locale locale,
String pattern,
Writer to,
Object... values) |
String |
format(Map<?,?> values) |
String |
format(Object... values) |
void |
format(Object value,
Writer to) |
void |
format(Writer to,
Iterable<?> values) |
void |
format(Writer to,
Map<?,?> values) |
void |
format(Writer to,
Object... values) |
protected static String |
formatInternal(Locale locale,
String pattern,
Object value) |
protected static void |
formatInternal(Locale locale,
String pattern,
Object value,
Writer to) |
protected String |
formatInternal(Object value) |
List<Formatter> |
getSubFormatter() |
protected Formatter |
getSubFormatterFor(Locale locale,
String parameter,
String id,
String pattern,
MessageFormatterFactory root) |
int |
hashCode() |
Iterator<Formatter> |
iterator() |
protected Formatter |
parseSubFormatter(Locale locale,
String pattern,
MessageFormatterFactory root) |
protected List<Formatter> |
parseSubFormatters(Locale locale,
String pattern,
MessageFormatterFactory root) |
String |
toString() |
getLocaleclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected static final ThreadLocal<Object> CALLED_VALUE
public MessageFormatter(@Nonnull Locale locale, @Nullable String pattern) throws IllegalArgumentException
IllegalArgumentExceptionpublic MessageFormatter(@Nonnull Locale locale, @Nullable String pattern, @Nullable FormatterFactory<?>... factories) throws IllegalArgumentException
IllegalArgumentExceptionprotected MessageFormatter(@Nonnull Locale locale, @Nullable String pattern, @Nonnull MessageFormatterFactory root) throws IllegalArgumentException
IllegalArgumentExceptionprotected MessageFormatter(@Nonnull Locale locale, @Nullable List<Formatter> subFormatter) throws IllegalArgumentException
IllegalArgumentExceptionprotected static void formatInternal(@Nonnull Locale locale, @Nonnull String pattern, @Nullable Object value, @Nonnull Writer to) throws IOException
IOException@Nonnull protected static String formatInternal(@Nonnull Locale locale, @Nonnull String pattern, @Nullable Object value)
public static void format(@Nonnull Locale locale, @Nonnull String pattern, @Nonnull Writer to, @Nullable Object... values) throws IOException
IOException@Nonnull public static String format(@Nonnull Locale locale, @Nonnull String pattern, @Nullable Object... values)
public static void format(@Nonnull Locale locale, @Nonnull String pattern, @Nonnull Writer to, @Nullable Iterable<?> values) throws IOException
IOException@Nonnull public static String format(@Nonnull Locale locale, @Nonnull String pattern, @Nullable Iterable<?> values)
public static void format(@Nonnull Locale locale, @Nonnull String pattern, @Nonnull Writer to, @Nullable Map<?,?> values) throws IOException
IOException@Nonnull public static String format(@Nonnull Locale locale, @Nonnull String pattern, @Nullable Map<?,?> values)
@Nonnull protected List<Formatter> parseSubFormatters(@Nonnull Locale locale, @Nullable String pattern, @Nonnull MessageFormatterFactory root) throws IllegalArgumentException
IllegalArgumentException@Nonnull protected Formatter parseSubFormatter(@Nonnull Locale locale, @Nonnull String pattern, @Nonnull MessageFormatterFactory root) throws IllegalArgumentException
IllegalArgumentException@Nonnull protected Formatter getSubFormatterFor(@Nonnull Locale locale, @Nonnull String parameter, @Nullable String id, @Nullable String pattern, @Nonnull MessageFormatterFactory root) throws IllegalArgumentException
IllegalArgumentExceptionpublic void format(@Nullable Object value, @Nonnull Writer to) throws IOException
format in interface FormatterIOExceptionpublic void format(@Nonnull Writer to, @Nullable Object... values) throws IOException
IOExceptionpublic void format(@Nonnull Writer to, @Nullable Iterable<?> values) throws IOException
IOExceptionpublic void format(@Nonnull Writer to, @Nullable Map<?,?> values) throws IOException
IOExceptionCopyright © 2023 echocat. All rights reserved.