ResourceBundle.Control

public static class ResourceBundle.Control extends Object

ResourceBundle.Control is a static utility class defines ResourceBundle load access methods, its default access order is as the same as before. However users can implement their own control.

Constant Summary

long TTL_DONT_CACHE a constant that indicates cache will not be used.
long TTL_NO_EXPIRATION_CONTROL a constant that indicates cache will not be expired.

Field Summary

public static final List<String> FORMAT_CLASS a list defines java class format
public static final List<String> FORMAT_DEFAULT a list defines default format
public static final List<String> FORMAT_PROPERTIES a list defines property format

Protected Constructor Summary

ResourceBundle.Control()
default constructor

Public Method Summary

List<Locale>
getCandidateLocales(String baseName, Locale locale)
Returns a list of candidate locales according to baseName in locale.
static ResourceBundle.Control
getControl(List<String> formats)
Returns a control according to formats.
Locale
getFallbackLocale(String baseName, Locale locale)
Returns the fallback locale for baseName in locale.
List<String>
getFormats(String baseName)
Returns a list of strings of formats according to baseName.
static ResourceBundle.Control
getNoFallbackControl(List<String> formats)
Returns a control according to formats whose fallback locale is null.
long
getTimeToLive(String baseName, Locale locale)
Returns the time to live of the ResourceBundle baseName in locale, default is TTL_NO_EXPIRATION_CONTROL.
boolean
needsReload(String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime)
Returns true if the ResourceBundle needs to reload.
ResourceBundle
newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload)
Returns a new ResourceBundle.
String
toBundleName(String baseName, Locale locale)
a utility method to answer the name of a resource bundle according to the given base name and locale
final String
toResourceName(String bundleName, String suffix)
a utility method to answer the name of a resource according to the given bundleName and suffix

Inherited Method Summary

Constants

public static final long TTL_DONT_CACHE

a constant that indicates cache will not be used.

Constant Value: -1

public static final long TTL_NO_EXPIRATION_CONTROL

a constant that indicates cache will not be expired.

Constant Value: -2

Fields

public static final List<String> FORMAT_CLASS

a list defines java class format

public static final List<String> FORMAT_DEFAULT

a list defines default format

public static final List<String> FORMAT_PROPERTIES

a list defines property format

Protected Constructors

protected ResourceBundle.Control ()

default constructor

Public Methods

public List<Locale> getCandidateLocales (String baseName, Locale locale)

Returns a list of candidate locales according to baseName in locale.

Par