Class BundleLocator

java.lang.Object
com.googlecode.lanterna.bundle.BundleLocator
Direct Known Subclasses:
LocalizedUIBundle

public abstract class BundleLocator extends Object
This class permits to deal easily with bundles.
  • Field Details

    • bundleName

      private final String bundleName
    • loader

      private static final ClassLoader loader
  • Constructor Details

    • BundleLocator

      protected BundleLocator(String bundleName)
      Hidden constructor.
      Parameters:
      bundleName - the name of the bundle.
  • Method Details

    • getBundleKeyValue

      protected String getBundleKeyValue(Locale locale, String key, Object... parameters)
      Method that centralizes the way to get the value associated to a bundle key.
      Parameters:
      locale - the locale.
      key - the key searched for.
      parameters - the parameters to apply to the value associated to the key.
      Returns:
      the formatted value associated to the given key. Empty string if no value exists for the given key.
    • getBundle

      private ResourceBundle getBundle(Locale locale)
      Gets the right bundle.
      A cache is handled as well as the concurrent accesses.
      Parameters:
      locale - the locale.
      Returns:
      the instance of the bundle.