Java Resource Message getMessage(Properties prop, String key, Object... args)

Here you can find the source of getMessage(Properties prop, String key, Object... args)

Description

get Message

License

Apache License

Declaration

public static String getMessage(Properties prop, String key, Object... args) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.MessageFormat;

import java.util.Properties;

public class Main {

    public static String getMessage(Properties prop, String key, Object... args) {
        String value = prop.getProperty(key);
        if (value == null)
            return null;
        return MessageFormat.format(value, args);
    }/*from   ww  w  .j a  v  a 2 s. co m*/
}

Related

  1. getMessage(final Locale locale, final String messageKey)
  2. getMessage(final String bundleName, final Locale locale, final String key, final Object... params)
  3. getMessage(Locale locale, String key, Object... args)
  4. getMessage(Locale locale, String key, String... args)
  5. getMessage(Properties props, String key, Object param)
  6. getMessage(ResourceBundle bundle, Object key, Object[] params)
  7. getMessage(ResourceBundle bundle, String key, Object... params)
  8. getMessage(ResourceBundle bundle, String key, Object... params)