static Message message(String key, Object... args) { return new FormattedMessage(BASE_CLASS, key, args); }
/** * Wraps the given resource bundle for formatting strings. * * @param bundle the resource bundle to wrap. */ public static FormattedResourceBundle wrap(ResourceBundle bundle) { return new FormattedResourceBundle(requireNonNull(bundle)); }
/** * Returns a formatted resource bundle for the given base name. * * @param baseName the base name of the resource bundle. */ public static FormattedResourceBundle bundle(String baseName) { return bundle(baseName, Locale.getDefault()); }
/** * Looks up a string resource identified by {@code key} in this resource * bundle and formats it with the given {@code args} using * {@link String#format(String, Object[])}. */ public String format(String key, Object... args) { return MessageFormat.format(lookup(key), args); }
final String message(Formattable key, Object... args) { return new MnemonicText(key.format(args).toString(locale())).getText(); }
@Override public final String toString() { return toString(Locale.getDefault()); } }
static Message message(String key, Object... args) { return new FormattedMessage(BASE_CLASS, key, args); }
/** * Returns a formatted resource bundle for the given base name with the * given locale. * * @param baseName the base name of the resource bundle. * @param locale the locale to use for the lookup. */ public static FormattedResourceBundle bundle(String baseName, Locale locale) { return new FormattedResourceBundle(ResourceBundle.getBundle(baseName, locale)); }
static Message message(String key, Object... args) { return new FormattedMessage(BASE_CLASS, key, args); }
static Message message(String key, Object... args) { return new FormattedMessage(BASE_CLASS, key, args); }