Class Localizer


  • public class Localizer
    extends java.lang.Object
    Class responsible for converting error codes to corresponding localized error messages.
    • Constructor Summary

      Constructors 
      Constructor Description
      Localizer()
      Default constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getMessage​(java.lang.String errCode)
      Returns the localized error message corresponding to the given error code.
      static java.lang.String getMessage​(java.lang.String errCode, java.lang.Object... args)
      Returns the localized error message corresponding to the given error code.
      • Methods inherited from class java.lang.Object

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

      • Localizer

        public Localizer()
        Default constructor.
    • Method Detail

      • getMessage

        public static java.lang.String getMessage​(java.lang.String errCode)
        Returns the localized error message corresponding to the given error code. If the given error code is not defined in the resource bundle for localized error messages, it is used as the error message.
        Parameters:
        errCode - Error code to localize
        Returns:
        Localized error message
      • getMessage

        public static java.lang.String getMessage​(java.lang.String errCode,
                                                  java.lang.Object... args)
        Returns the localized error message corresponding to the given error code. If the given error code is not defined in the resource bundle for localized error messages, it is used as the error message.
        Parameters:
        errCode - Error code to localize
        args - Arguments for parametric replacement
        Returns:
        Localized error message