Returns the string specified by aKey from the errors.properties bundle.
@param aKey The key for the message pattern in the bundle.
@param args The args to use in the message format.
353636
public static String getString(String aKey, Object[] args)
    {
        assert (aKey != null);

        String pattern = getBundle().getString(aKey);
        if (args == null)
            return pattern;

        MessageFormat format = new MessageFormat(pattern);
        return format.format(args).toString();
    }
23401
public static FormValidation error(String format, Object... args) {
        return error(String.format(format,args));
    }
668365
public static String getLocalizedString(String key, Object ... args) {
        return JavacMessages.getDefaultLocalizedString(PrefixKind.COMPILER_MISC.key(key), args);
    }
1304748
public static String getText(String key, ResourceBundle bundle, Object... arguments)
	{
		try
		{
			String value = bundle.getString(key);

			return MessageFormat.format(value, arguments);
		}
		catch (MissingResourceException ex)
		{
			return key;
		}
	}
985148
String messageFormat(String key, Object... args) {
        if (outputRB == null) {
            try {
                outputRB = ResourceBundle.getBundle(L10N_RB_NAME);
            } catch (MissingResourceException mre) {
                throw new InternalError("Cannot find ResourceBundle: " + L10N_RB_NAME);
            }
        }
        String s;
        try {
            s = outputRB.getString(key);
        } catch (MissingResourceException mre) {
            throw new InternalError("Missing resource: " + key + " in " + L10N_RB_NAME);
        }
        return MessageFormat.format(s, args);
    }
147838
private String get(ChaincodeStub stub, List<String> args) {
        if (args.size() != 1) {
            throw new RuntimeException("Incorrect arguments. Expecting a key");
        }

        String value = stub.getStringState(args.get(0));
        if (value == null || value.isEmpty()) {
            throw new RuntimeException("Asset not found: " + args.get(0));
        }
        return value;
    }
112072
public static Message warn(Entity entity, String key, String... args) {
        return message(MessageType.WARN, entity, key, args);
    }
1344068
String getText(String key, Object... args) {
        return messages.getLocalizedString(locale, key, args);
    }
1212515
static public String getString(String msg, Object[] args)
	{
		String format = msg;

		if (bundle != null)
		{
			try
			{
				format = bundle.getString(msg);
			}
			catch (MissingResourceException e)
			{
			}
		}

		return format(format, args);
	}
710558
String messageFormat(String key, Object... args) {
        String rs = getResourceString(key);
        return MessageFormat.format(rs, args);
    }
1022977
protected final void args(Object... args) {
        if (args == null) args = NO_ARGS;
        this.args = args;
        retry();
    }
1157625
protected final void addError(String msgKey, Object... args) {
    getFlash().addErrorNow(getTextInternal(msgKey, args));
  }
1323547
public void error( String format, Object arg )
    {
        if( m_delegate.isErrorEnabled() )
        {
            FormattingTuple tuple = MessageFormatter.format( format, arg );
            m_delegate.error( tuple.getMessage(), tuple.getThrowable() );
        }
    }
162817
public void warning(String key, Object... args) {
        report(WARNING, resources.getText(key, args));
    }
35033
public String getText(String key, String defaultValue, Object... args) {
    String text = doGetText(key);
    if (null == text) text = (null == defaultValue && keyAsDefault) ? key : defaultValue;
    if (null != text && args.length > 0) return formater.format(text, locale, args);
    return text;
  }
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);
    }
1130435
private String applyPattern( String key, Object[] messageArguments )
    {
        String message = getString( key );
//        MessageFormat formatter = new MessageFormat( message );
        String output = MessageFormat.format( message, messageArguments );
        return output;
    }