Skip navigation links
atg.core.i18n

Class LayeredResourceBundle

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.ResourceBundle getBundle(java.lang.String pBaseName)
      Gets a layered resource bundle using the specified base name, the default locale, and the LayeredResourceBundle's class loader.
      static java.util.ResourceBundle getBundle(java.lang.String pBaseName, java.util.Locale pLocale)
      Gets a layered resource bundle using the specified base name and locale, and the LayeredResourceBundle's class loader.
      static java.util.ResourceBundle getBundle(java.lang.String pBaseName, java.util.Locale pLocale, java.lang.ClassLoader pLoader)
      Gets a resource bundle using the specified base name, locale, and class loader.
      static void main(java.lang.String[] pArgs) 
      • Methods inherited from class java.lang.Object

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

      • CLASS_VERSION

        public static java.lang.String CLASS_VERSION
        Class version string
      • STRING_LAYERED_JAVA_PROPERTIES

        public static final java.lang.String STRING_LAYERED_JAVA_PROPERTIES
        The string for the "layered_java.properties" format we support.
        See Also:
        Constant Field Values
      • FORMAT_LAYERED_PROPERTIES

        public static final java.util.List<java.lang.String> FORMAT_LAYERED_PROPERTIES
        The layered-properties-only format List containing "layered_java.properties". This List is unmodifiable.
        See Also:
        #getFormats(String)
    • Constructor Detail

      • LayeredResourceBundle

        public LayeredResourceBundle()
    • Method Detail

      • getBundle

        public static final java.util.ResourceBundle getBundle(java.lang.String pBaseName)
        Gets a layered resource bundle using the specified base name, the default locale, and the LayeredResourceBundle's class loader. Calling this method is equivalent to calling getBundle(baseName, Locale.getDefault(), Thread.currentThread().getContextClassLoader()). And, if the above returns null, returning the result of: getBundle(baseName, Locale.getDefault(), LayeredResourceBundle.class.getClassLoader()).

        Parameters:
        pBaseName - the base name of the resource bundle, a fully qualified class name
        Returns:
        a resource bundle for the given base name and the default locale
        Throws:
        java.lang.NullPointerException - if baseName is null
        java.util.MissingResourceException - if no resource bundle for the specified base name can be found
        See Also:
        ResourceBundle.getBundle(String)
      • getBundle

        public static final java.util.ResourceBundle getBundle(java.lang.String pBaseName,
                                                               java.util.Locale pLocale)
        Gets a layered resource bundle using the specified base name and locale, and the LayeredResourceBundle's class loader. Calling this method is equivalent to calling getBundle(baseName, Locale.getDefault(), Thread.currentThread().getContextClassLoader()). And, if the above returns null, returning the result of: getBundle(baseName, locale, LayeredResourceBundle.class.getClassLoader()).

        Parameters:
        pBaseName - the base name of the resource bundle, a fully qualified class name
        pLocale - the locale for which a resource bundle is desired
        Returns:
        a resource bundle for the given base name and locale
        Throws:
        java.lang.NullPointerException - if baseName or locale is null
        java.util.MissingResourceException - if no resource bundle for the specified base name can be found
        See Also:
        ResourceBundle.getBundle(String,Locale)
      • getBundle

        public static java.util.ResourceBundle getBundle(java.lang.String pBaseName,
                                                         java.util.Locale pLocale,
                                                         java.lang.ClassLoader pLoader)
        Gets a resource bundle using the specified base name, locale, and class loader. See ResourceBundle.getBundle(String,Locale,ClassLoader) for a full description of the search path used to obtain a resource bundle. This is further augmented by a pre-processing step, where all resource bundle properties files with a given name will be collapsed into a single file. The files will be combine in such a way that entries which come early in the classpath will appear at the end of the input stream. The ResourceBundle code will then create a Properties instance using that composite input stream. Given that later entries in the Properties map will overwrite earlier entries, the result will be a ResourceBundle whose values can be overriden by prepending a sparse properties file, containing only the values to be altered, to the beginning of the class-path.

        Parameters:
        baseName - the base name of the resource bundle, a fully qualified class name
        locale - the locale for which a resource bundle is desired
        loader - the class loader from which to load the resource bundle
        Returns:
        a resource bundle for the given base name and locale
        Throws:
        java.lang.NullPointerException - if baseName, locale, or loader is null
        java.util.MissingResourceException - if no resource bundle for the specified base name can be found
        See Also:
        ResourceBundle.getBundle(String,Locale,ClassLoader)
      • main

        public static void main(java.lang.String[] pArgs)