Class BundleUtilities


  • public final class BundleUtilities
    extends Object
    Facility class to manage resource bundles.
    Since:
    3.1-ALPHA-2
    Version:
    $Id: $
    Author:
    Fabrizio Giudici ([email protected])
    • Constructor Detail

      • BundleUtilities

        public BundleUtilities()
    • Method Detail

      • getMessage

        @Nonnull
        public static String getMessage​(@Nonnull
                                        Class<?> ownerClass,
                                        @Nonnull
                                        String resourceName,
                                        @Nonnull
                                        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 String getMessage​(@Nonnull
                                        Class<?> ownerClass,
                                        @Nonnull
                                        Locale locale,
                                        @Nonnull
                                        String resourceName,
                                        @Nonnull
                                        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