Top Description Inners Fields Constructors Methods
sun.util.resources

public Class LocaleData

extends Object
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, java.util.Iterator, .List, .Locale, .Map, .MissingResourceException, .ResourceBundle, .Set, java.util.concurrent.ConcurrentHashMap, java.util.spi.ResourceBundleProvider, sun.util.locale.provider.JRELocaleProviderAdapter, .LocaleProviderAdapter, .ResourceBundleBasedAdapter

Provides information about and access to resource bundles in the sun.text.resources and sun.util.resources packages or in their corresponding packages for CLDR.
Authors
Asmus Freytag, Mark Davis

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
LocaleData.CommonResourceBundleProvider

A ResourceBundleProvider implementation for loading locale data resource bundles except for the java.time supplementary data.

private abstract static class
private static class
public abstract static class
LocaleData.SupplementaryResourceBundleProvider

A ResourceBundleProvider implementation for loading supplementary resource bundles for java.time.

private static class

Field Summary

Modifier and TypeField and Description
private static final Map<String, List<Locale>>
private static final ResourceBundle.Control
private static final String
private final LocaleProviderAdapter.Type

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ResourceBundle
getBreakIteratorInfo(Locale locale)

Gets a break iterator info resource bundle, using privileges to allow accessing a sun.* package.

public ResourceBundle
getBreakIteratorResources(Locale locale)

Gets a break iterator resources resource bundle, using privileges to allow accessing a sun.* package.

public static ResourceBundle
getBundle(final String baseName, final Locale locale)

public ResourceBundle
getCalendarData(Locale locale)

Gets a calendar data resource bundle, using privileges to allow accessing a sun.* package.

public ResourceBundle
getCollationData(Locale locale)

Gets a collation data resource bundle, using privileges to allow accessing a sun.* package.

public OpenListResourceBundle
getCurrencyNames(Locale locale)

Gets a currency names resource bundle, using privileges to allow accessing a sun.* package.

public ResourceBundle
getDateFormatData(Locale locale)

Gets a date format data resource bundle, using privileges to allow accessing a sun.* package.

public OpenListResourceBundle
getLocaleNames(Locale locale)

Gets a locale names resource bundle, using privileges to allow accessing a sun.* package.

public ResourceBundle
getNumberFormatData(Locale locale)

Gets a number format data resource bundle, using privileges to allow accessing a sun.* package.

private static OpenListResourceBundle
getSupplementary(final String baseName, final Locale locale)

public TimeZoneNamesBundle
getTimeZoneNames(Locale locale)

Gets a time zone names resource bundle, using privileges to allow accessing a sun.* package.

public void
private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CANDIDATES_MAPback to summary
private static final Map<String, List<Locale>> CANDIDATES_MAP
defaultControlback to summary
private static final ResourceBundle.Control defaultControl
DOTCLDRback to summary
private static final String DOTCLDR
typeback to summary
private final LocaleProviderAdapter.Type type

Constructor Detail

LocaleDataback to summary
public LocaleData(LocaleProviderAdapter.Type type)

Method Detail

getBreakIteratorInfoback to summary
public ResourceBundle getBreakIteratorInfo(Locale locale)

Gets a break iterator info resource bundle, using privileges to allow accessing a sun.* package.

getBreakIteratorResourcesback to summary
public ResourceBundle getBreakIteratorResources(Locale locale)

Gets a break iterator resources resource bundle, using privileges to allow accessing a sun.* package.

getBundleback to summary
public static ResourceBundle getBundle(final String baseName, final Locale locale)
Annotations
@SuppressWarnings:removal
getCalendarDataback to summary
public ResourceBundle getCalendarData(Locale locale)

Gets a calendar data resource bundle, using privileges to allow accessing a sun.* package.

getCollationDataback to summary
public ResourceBundle getCollationData(Locale locale)

Gets a collation data resource bundle, using privileges to allow accessing a sun.* package.

getCurrencyNamesback to summary
public OpenListResourceBundle getCurrencyNames(Locale locale)

Gets a currency names resource bundle, using privileges to allow accessing a sun.* package.

getDateFormatDataback to summary
public ResourceBundle getDateFormatData(Locale locale)

Gets a date format data resource bundle, using privileges to allow accessing a sun.* package.

getLocaleNamesback to summary
public OpenListResourceBundle getLocaleNames(Locale locale)

Gets a locale names resource bundle, using privileges to allow accessing a sun.* package.

getNumberFormatDataback to summary
public ResourceBundle getNumberFormatData(Locale locale)

Gets a number format data resource bundle, using privileges to allow accessing a sun.* package.

getSupplementaryback to summary
private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale)
Annotations
@SuppressWarnings:removal
getTimeZoneNamesback to summary
public TimeZoneNamesBundle getTimeZoneNames(Locale locale)

Gets a time zone names resource bundle, using privileges to allow accessing a sun.* package.

setSupplementaryback to summary
public void setSupplementary(ParallelListResourceBundle formatData)
setSupplementaryback to summary
private boolean setSupplementary(String suppName, ParallelListResourceBundle formatData)
sun.util.resources back to summary

public abstract Class LocaleData.CommonResourceBundleProvider

extends LocaleDataResourceBundleProvider
Class Inheritance

A ResourceBundleProvider implementation for loading locale data resource bundles except for the java.time supplementary data.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from sun.util.resources.LocaleData.LocaleDataResourceBundleProvider:
toBundleNametoOtherBundleName

Constructor Detail

CommonResourceBundleProviderback to summary
public CommonResourceBundleProvider()
sun.util.resources back to summary

private abstract Class LocaleData.LocaleDataResourceBundleProvider

extends Object
implements ResourceBundleProvider
Class Inheritance
  • java.lang.Object
  • sun.util.resources.LocaleData.LocaleDataResourceBundleProvider
All Implemented Interfaces
java.util.spi.ResourceBundleProvider
Known Direct Subclasses
sun.util.resources.LocaleData.CommonResourceBundleProvider, sun.util.resources.LocaleData.SupplementaryResourceBundleProvider

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected String
toBundleName(String baseName, Locale locale)

Changes baseName to its module dependent package name and calls the super class implementation.

protected String
toOtherBundleName(String baseName, String bundleName, Locale locale)

Retrieves the other bundle name for legacy ISO 639 languages.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LocaleDataResourceBundleProviderback to summary
private LocaleDataResourceBundleProvider()

Method Detail

toBundleNameback to summary
protected String toBundleName(String baseName, Locale locale)

Changes baseName to its module dependent package name and calls the super class implementation. For example, if the baseName is "sun.text.resources.FormatData" and locale is ja_JP, the baseName is changed to "sun.text.resources.ext.FormatData". If baseName contains ".cldr", such as "sun.text.resources.cldr.FormatData", the name is changed to "sun.text.resources.cldr.ext.FormatData".

toOtherBundleNameback to summary
protected String toOtherBundleName(String baseName, String bundleName, Locale locale)

Retrieves the other bundle name for legacy ISO 639 languages.

sun.util.resources back to summary

private Class LocaleData.LocaleDataStrategy

extends Object
implements Strategy
Class Inheritance
All Implemented Interfaces
sun.util.resources.Bundles.Strategy
Known Direct Subclasses
sun.util.resources.LocaleData.SupplementaryStrategy

Field Summary

Modifier and TypeField and Description
private static final LocaleData.LocaleDataStrategy
private static final Set<Locale>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public List<Locale>
getCandidateLocales(String baseName, Locale locale)

Implements sun.util.resources.Bundles.Strategy.getCandidateLocales.

Returns a list of locales to be looked up for bundle loading.

public Class<? extends ResourceBundleProvider>
getResourceBundleProviderType(String baseName, Locale locale)

Implements sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Returns the service provider type for the given baseName and locale, or null if no service providers should be used.

pack-priv boolean
inJavaBaseModule(String baseName, Locale locale)

public String
toBundleName(String baseName, Locale locale)

Implements sun.util.resources.Bundles.Strategy.toBundleName.

Returns the bundle name for the given baseName and locale.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final LocaleData.LocaleDataStrategy INSTANCE
JAVA_BASE_LOCALESback to summary
private static final Set<Locale> JAVA_BASE_LOCALES

Constructor Detail

LocaleDataStrategyback to summary
private LocaleDataStrategy()

Method Detail

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

Implements sun.util.resources.Bundles.Strategy.getCandidateLocales.

Doc from sun.util.resources.Bundles.Strategy.getCandidateLocales.

Returns a list of locales to be looked up for bundle loading.

Annotations
@Override
getResourceBundleProviderTypeback to summary
public Class<? extends ResourceBundleProvider> getResourceBundleProviderType(String baseName, Locale locale)

Implements sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Doc from sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Returns the service provider type for the given baseName and locale, or null if no service providers should be used.

Annotations
@Override
inJavaBaseModuleback to summary
pack-priv boolean inJavaBaseModule(String baseName, Locale locale)
toBundleNameback to summary
public String toBundleName(String baseName, Locale locale)

Implements sun.util.resources.Bundles.Strategy.toBundleName.

Doc from sun.util.resources.Bundles.Strategy.toBundleName.

Returns the bundle name for the given baseName and locale.

Annotations
@Override
sun.util.resources back to summary

public abstract Class LocaleData.SupplementaryResourceBundleProvider

extends LocaleDataResourceBundleProvider
Class Inheritance

A ResourceBundleProvider implementation for loading supplementary resource bundles for java.time.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from sun.util.resources.LocaleData.LocaleDataResourceBundleProvider:
toBundleNametoOtherBundleName

Constructor Detail

SupplementaryResourceBundleProviderback to summary
public SupplementaryResourceBundleProvider()
sun.util.resources back to summary

private Class LocaleData.SupplementaryStrategy

extends LocaleDataStrategy
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final LocaleData.SupplementaryStrategy
private static final Set<Locale>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public List<Locale>
getCandidateLocales(String baseName, Locale locale)

Overrides sun.util.resources.LocaleData.LocaleDataStrategy.getCandidateLocales.

Implements sun.util.resources.Bundles.Strategy.getCandidateLocales.

Returns a list of locales to be looked up for bundle loading.

public Class<? extends ResourceBundleProvider>
getResourceBundleProviderType(String baseName, Locale locale)

Overrides sun.util.resources.LocaleData.LocaleDataStrategy.getResourceBundleProviderType.

Implements sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Returns the service provider type for the given baseName and locale, or null if no service providers should be used.

pack-priv boolean
Inherited from sun.util.resources.LocaleData.LocaleDataStrategy:
toBundleName

Field Detail

INSTANCEback to summary
private static final LocaleData.SupplementaryStrategy INSTANCE

Hides sun.util.resources.LocaleData.LocaleDataStrategy.INSTANCE.

JAVA_BASE_LOCALESback to summary
private static final Set<Locale> JAVA_BASE_LOCALES

Hides sun.util.resources.LocaleData.LocaleDataStrategy.JAVA_BASE_LOCALES.

Constructor Detail

SupplementaryStrategyback to summary
private SupplementaryStrategy()

Method Detail

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

Overrides sun.util.resources.LocaleData.LocaleDataStrategy.getCandidateLocales.

Implements sun.util.resources.Bundles.Strategy.getCandidateLocales.

Doc from sun.util.resources.Bundles.Strategy.getCandidateLocales.

Returns a list of locales to be looked up for bundle loading.

Annotations
@Override
getResourceBundleProviderTypeback to summary
public Class<? extends ResourceBundleProvider> getResourceBundleProviderType(String baseName, Locale locale)

Overrides sun.util.resources.LocaleData.LocaleDataStrategy.getResourceBundleProviderType.

Implements sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Doc from sun.util.resources.Bundles.Strategy.getResourceBundleProviderType.

Returns the service provider type for the given baseName and locale, or null if no service providers should be used.

Annotations
@Override
inJavaBaseModuleback to summary
pack-priv boolean inJavaBaseModule(String baseName, Locale locale)

Overrides sun.util.resources.LocaleData.LocaleDataStrategy.inJavaBaseModule.

Annotations
@Override