Class DynamicResourceBundleHolder


  • public class DynamicResourceBundleHolder
    extends Object
    An alternative to ResourceBundleHolder that does not require a statically generated class with the same name as the properties file.
    • Method Detail

      • get

        public static DynamicResourceBundleHolder get​(Class<?> owner,
                                                      String shortName)
        Returns a ResourceBundleHolder for the given class.
        Parameters:
        owner - the resource bundle owner
        shortName - the resource bundle name relative to the owner
        Returns:
        a ResourceBundleHolder for the given class
      • format

        public String format​(String key,
                             Object... args)
        Formats a resource specified by the given key by using the default locale
        Parameters:
        key - key
        args - object(s) to format
        Returns:
        the formatted string