- java.lang.Object
-
- com.googlecode.lanterna.bundle.BundleLocator
-
- Direct Known Subclasses:
LocalizedUIBundle
public abstract class BundleLocator extends java.lang.ObjectThis class permits to deal easily with bundles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classBundleLocator.UTF8Control
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbundleNameprivate static java.lang.ClassLoaderloader
-
Constructor Summary
Constructors Modifier Constructor Description protectedBundleLocator(java.lang.String bundleName)Hidden constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.ResourceBundlegetBundle(java.util.Locale locale)Gets the right bundle.
A cache is handled as well as the concurrent accesses.protected java.lang.StringgetBundleKeyValue(java.util.Locale locale, java.lang.String key, java.lang.Object... parameters)Method that centralizes the way to get the value associated to a bundle key.
-
-
-
Method Detail
-
getBundleKeyValue
protected java.lang.String getBundleKeyValue(java.util.Locale locale, java.lang.String key, java.lang.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 java.util.ResourceBundle getBundle(java.util.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.
-
-