Gets the message as defined by the provided messageKey and substitutes the provided object values in the message.
@param messageKey the key of the message pattern
@param objects the object values to substitute
@return the formatted message
340646
public String getMessage(final String messageKey, final Object... objects) {
        //TODO validate input
        return getFormattedMessage(getMessagePattern(messageKey), objects);
    }
1318077
protected String getRequiredMessage(final String[] messageKeys) {
		MessageSourceResolvable resolvable = new MessageSourceResolvable() {

			public String[] getCodes() {
				return messageKeys;
			}

			public Object[] getArguments() {
				return null;
			}

			public String getDefaultMessage() {
				if (messageKeys.length > 0) {
					return messageKeys[0];
				}
				return "";
			}
		};
		return getMessages().getMessage(resolvable);
	}
876602
public String getString(final String key, final Object... args) {
        String value = getString(key);
        if (value == null) {
            value = key;
        }

        MessageFormat mf = new MessageFormat(value);
        mf.setLocale(locale);
        return mf.format(args, new StringBuffer(), null).toString();
    }
271401
public static String getMessage(final Class class1, final String string, final Object[] objects) {
		return JKMessage.get(string, objects);
	}
321762
public Collection<ValidationMessage<Origin>> getMessages(String messageKey) {

		Collection<ValidationMessage<Origin>> result = new ArrayList<ValidationMessage<Origin>>();

		for (ValidationMessage<Origin> message : messages) {
			if (messageKey.equals(message.getMessageKey())) {
				result.add(message);
			}
		}
		return result;
	}
1344068
String getText(String key, Object... args) {
        return messages.getLocalizedString(locale, key, args);
    }
556422
public String message(String key, Object... params) {
        if (key == null) {
            return null;
        }
        try {
            String string = (getResourceBundle().containsKey(key)) ? getResourceBundle().getString(key) : key;
            if (params != null) {
                for (int i = 0; i < params.length; i++) {
                    String param = (params[i] == null) ? "" : params[i].toString();
                    string = string.replaceAll("\\{" + i + "\\}", param);
                }
            }
            return string;
        } catch (Exception e) {
            return key;
        }
    }
101556
@Override
    protected Object handleGetObject(String key) {
        try {
            return this.messageSource.getMessage(key, null, this.locale);
        } catch (NoSuchMessageException ex) {
            return null;
        }
    }
412483
public String getText(String key, Object... args) throws MissingResourceException {
        if (messageRB == null) {
            try {
                messageRB = ResourceBundle.getBundle(resourcelocation);
            } catch (MissingResourceException e) {
                throw new Error("Fatal: Resource (" + resourcelocation +
                                    ") for javadoc doclets is missing.");
            }
        }
        String message = messageRB.getString(key);
        return MessageFormat.format(message, args);
    }
101388
@Trivial
    public static final String getMessage(String key, Object... params) {
        return TraceNLS.getFormattedMessage(Utils.class, tc.getResourceBundleName(), key, params, key);
    }
871619
public CmsMenuItemVisibilityMode addMessageKey(String messageKey) {

        CmsMenuItemVisibilityMode mode = clone();
        mode.m_messageKey = messageKey;
        return mode;
    }
853633
public String getMessage(String key, Object... params)
    {
        String message = getMessage(key);
        MessageFormat fmt = new MessageFormat(message);  
        return fmt.format(params);  
    }
1229910
public String getMessage(String key, String... params) {
        // 参数校验
        if (key == null) {
            return null;
        }
        // 得到message内容
        String msg = bundle.getString(key);
        // 如果不存在动态内容,则直接返回msg
        if (params == null || params.length == 0) {
            return msg;
        }
        // 存在动态内容,渲染后返回新的message
        if (StringUtils.isBlank(msg)) {
            // 如果得到的msg为null或者空字符串,则直接返回msg本身
            return msg;
        }
        return MessageFormat.format(msg, (Object[]) params);
    }
158811
public String getMessage(final Locale locale, final String key) {
        return loadResource(locale).getMessage(key);
    }
744057
public static String getMessage(String key, Object... args) {
        if (messages == null) {
            if (locale == null)
                locale = Locale.getDefault();
            messages = ResourceBundle.getBundle("com.ibm.ws.install.internal.resources.Repository", locale);
        }
        String message = messages.getString(key);
        if (args.length == 0)
            return message;
        MessageFormat messageFormat = new MessageFormat(message, locale);
        return messageFormat.format(args);
    }
1241128
@Override
  public final String getMsg(final String pKey, final String pLang) {
    try {
      ResourceBundle mb = messagesMap.get(pLang);
      if (mb != null) {
        return mb.getString(pKey);
      } else {
        return getMsg(pKey);
      }
    } catch (Exception e) {
      return "[" + pKey + "]-" + pLang;
    }
  }
1156370
public String getFormatted(String key, String argument) {
        return MessageFormat.format(resource.getString(key), new Object[] {argument});
    }