Package io.github.jy95.fds.common.bundle
Class MultiResourceBundleControl
java.lang.Object
java.util.ResourceBundle.Control
io.github.jy95.fds.common.bundle.MultiResourceBundleControl
A custom ResourceBundle.Control implementation that aggregates multiple ResourceBundles.
This class facilitates the creation of a MultiResourceBundle by combining dependent ResourceBundles.
- Author:
- jy95
-
Field Summary
Fields inherited from class java.util.ResourceBundle.Control
FORMAT_CLASS, FORMAT_DEFAULT, FORMAT_PROPERTIES, TTL_DONT_CACHE, TTL_NO_EXPIRATION_CONTROL
-
Constructor Summary
ConstructorDescriptionMultiResourceBundleControl
(String baseName, String... dependentBaseNames) Constructs a MultiResourceBundleControl with the specified base name and dependent base names. -
Method Summary
Modifier and TypeMethodDescriptionnewBundle
(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) Methods inherited from class java.util.ResourceBundle.Control
getCandidateLocales, getControl, getFallbackLocale, getFormats, getNoFallbackControl, getTimeToLive, needsReload, toBundleName, toResourceName
-
Constructor Details
-
MultiResourceBundleControl
Constructs a MultiResourceBundleControl with the specified base name and dependent base names.- Parameters:
baseName
- the base name of the primary ResourceBundle.dependentBaseNames
- the base names of additional ResourceBundles to aggregate.
-
-
Method Details
-
newBundle
public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) - Overrides:
newBundle
in classResourceBundle.Control
-