Class BundleUtilities


  • public final class BundleUtilities
    extends java.lang.Object
    Facility class to manage resource bundles.
    Since:
    3.1-ALPHA-2
    Author:
    Fabrizio Giudici
    • Constructor Summary

      Constructors 
      Constructor Description
      BundleUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getMessage​(java.lang.Class<?> ownerClass, java.lang.String resourceName, java.lang.Object... params)
      Returns a localised message.
      static java.lang.String getMessage​(java.lang.Class<?> ownerClass, java.util.Locale locale, java.lang.String resourceName, java.lang.Object... params)
      Returns a localised message.
      • Methods inherited from class java.lang.Object

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

      • BundleUtilities

        public BundleUtilities()
    • Method Detail

      • getMessage

        @Nonnull
        public static java.lang.String getMessage​(@Nonnull
                                                  java.lang.Class<?> ownerClass,
                                                  @Nonnull
                                                  java.lang.String resourceName,
                                                  @Nonnull
                                                  java.lang.Object... params)
        Returns a localised message.
        Parameters:
        ownerClass - the owner of the bundle
        resourceName - the name of the resource inside the bundle
        params - the parameters (used if the string in the bundle is a String format)
        Returns:
        the message
      • getMessage

        @Nonnull
        public static java.lang.String getMessage​(@Nonnull
                                                  java.lang.Class<?> ownerClass,
                                                  @Nonnull
                                                  java.util.Locale locale,
                                                  @Nonnull
                                                  java.lang.String resourceName,
                                                  @Nonnull
                                                  java.lang.Object... params)
        Returns a localised message.
        Parameters:
        ownerClass - the owner of the bundle
        locale - the Locale
        resourceName - the name of the resource inside the bundle
        params - the parameters (used if the string in the bundle is a String format)
        Returns:
        the message
        Since:
        3.1-ALPHA-4