Package info.freelibrary.util
Class CustomBundleControl
- java.lang.Object
-
- java.util.ResourceBundle.Control
-
- info.freelibrary.util.CustomBundleControl
-
public class CustomBundleControl extends ResourceBundle.Control
A resource bundle control that supports theXMLResourceBundle
.
-
-
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
Constructors Constructor Description CustomBundleControl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getFormats(String aBaseName)
Returns a list of formats supported for the supplied base name.ResourceBundle
newBundle(String aBaseName, Locale aLocale, String aFormat, ClassLoader aClassLoader, boolean aReload)
Creates a newResourceBundle
.-
Methods inherited from class java.util.ResourceBundle.Control
getCandidateLocales, getControl, getFallbackLocale, getNoFallbackControl, getTimeToLive, needsReload, toBundleName, toResourceName
-
-
-
-
Method Detail
-
getFormats
public List<String> getFormats(String aBaseName)
Returns a list of formats supported for the supplied base name.- Overrides:
getFormats
in classResourceBundle.Control
- Parameters:
aBaseName
- for which to get formats- Returns:
- A
List
of strings
-
newBundle
public ResourceBundle newBundle(String aBaseName, Locale aLocale, String aFormat, ClassLoader aClassLoader, boolean aReload) throws IllegalAccessException, InstantiationException, IOException
Creates a newResourceBundle
.- Overrides:
newBundle
in classResourceBundle.Control
- Parameters:
aBaseName
- A base name for the bundleaLocale
- A locale for the bundleaFormat
- A format for the bundleaClassLoader
- AClassLoader
for the bundleaReload
- Whether the bundle is to be reloaded- Throws:
IllegalAccessException
InstantiationException
IOException
-
-