Class JepMessages


  • public class JepMessages
    extends java.lang.Object
    Class to handle externalisation of error messages. Uses a bundle name of "com.singularsys.jep.messages"
    Since:
    3.5
    See Also:
    ResourceBundle
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(java.lang.String key, java.lang.Object... args)
      Gets a message and uses that to format its arguments.
      static java.lang.String getString​(java.lang.String key)
      Gets the message associated with a given string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getString

        public static java.lang.String getString​(java.lang.String key)
        Gets the message associated with a given string.
        Parameters:
        key - key to message
        Returns:
        the message
      • format

        public static java.lang.String format​(java.lang.String key,
                                              java.lang.Object... args)
        Gets a message and uses that to format its arguments.
        Parameters:
        key - key to message which is a format string used by MessageFormat.format(String, Object...)
        args - set of arguments to be passed to the format
        Returns:
        Message format applied to arguments