Top Description Fields Constructors Methods
sun.util.cldr

public Class CLDRLocaleProviderAdapter

extends JRELocaleProviderAdapter
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, .PrivilegedActionException, .PrivilegedExceptionAction, java.text.spi.BreakIteratorProvider, .CollatorProvider, java.util.Arrays, .Collections, .List, .Locale, .Map, .Optional, .ServiceLoader, .Set, java.util.concurrent.ConcurrentHashMap, java.util.spi.CalendarDataProvider, .CalendarNameProvider, .TimeZoneNameProvider, sun.util.locale.provider.JRELocaleProviderAdapter, .LocaleDataMetaInfo, .LocaleProviderAdapter

LocaleProviderAdapter implementation for the CLDR locale data.
Authors
Masayoshi Okutsu, Naoto Sato

Field Summary

Modifier and TypeField and Description
private static volatile Locale[]
private static final CLDRBaseLocaleDataMetaInfo
private static final Map<Locale, Locale>
private static final Locale
private static final Locale
private final LocaleDataMetaInfo
private static final Map<Locale, Locale>
Inherited from sun.util.locale.provider.JRELocaleProviderAdapter:
calendarDataProvidercalendarNameProvidertimeZoneNameProvider

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Locale
private List<Locale>
applyParentLocales(String baseName, List<Locale> candidates)

public Optional<String>
canonicalTZID(String id)

Returns the canonical ID for the given ID

protected Set<String>
public LocaleProviderAdapter.Type

Returns:

the type of this
getAdapterType
()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getAdapterType.

Returns the type of this LocaleProviderAdapter

public Locale[]
public BreakIteratorProvider
getBreakIteratorProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getBreakIteratorProvider.

Returns a BreakIteratorProvider for this LocaleProviderAdapter, or null if no BreakIteratorProvider is available.

public CalendarDataProvider
getCalendarDataProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCalendarDataProvider.

Returns a CalendarDataProvider for this LocaleProviderAdapter, or null if no CalendarDataProvider is available.

public CalendarNameProvider
getCalendarNameProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCalendarNameProvider.

Returns a CalendarNameProvider for this LocaleProviderAdapter, or null if no CalendarNameProvider is available.

public List<Locale>
public CollatorProvider
getCollatorProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCollatorProvider.

Returns a CollatorProvider for this LocaleProviderAdapter, or null if no CollatorProvider is available.

private static Locale
getEquivalentLoc(Locale locale)

This method returns equivalent CLDR supported locale for no, no-NO locales so that COMPAT locales do not precede those locales during ResourceBundle search path, also if an alias exists for a locale, it returns equivalent locale, e.g for zh_HK it returns zh_Hant-HK.

private static Locale
public TimeZoneNameProvider
getTimeZoneNameProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getTimeZoneNameProvider.

Returns a TimeZoneNameProvider for this LocaleProviderAdapter, or null if no TimeZoneNameProvider is available.

public boolean
isSupportedProviderLocale(Locale locale, Set<String> langtags)

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.isSupportedProviderLocale.

A utility method for implementing the default LocaleServiceProvider.isSupportedLocale for the JRE, CLDR, and FALLBACK adapters.

Inherited from sun.util.locale.provider.JRELocaleProviderAdapter:
getCalendarProvidergetCurrencyNameProvidergetDateFormatProvidergetDateFormatSymbolsProvidergetDecimalFormatSymbolsProvidergetJavaTimeDateTimePatternProvidergetLanguageTagSetgetLocaleDatagetLocaleNameProvidergetLocaleResourcesgetLocaleServiceProvidergetNumberFormatProvider

Field Detail

AVAILABLE_LOCALESback to summary
private static volatile Locale[] AVAILABLE_LOCALES
baseMetaInfoback to summary
private static final CLDRBaseLocaleDataMetaInfo baseMetaInfo
langAliasesCacheback to summary
private static final Map<Locale, Locale> langAliasesCache
NBback to summary
private static final Locale NB
NOback to summary
private static final Locale NO
nonBaseMetaInfoback to summary
private final LocaleDataMetaInfo nonBaseMetaInfo
parentLocalesMapback to summary
private static final Map<Locale, Locale> parentLocalesMap

Constructor Detail

CLDRLocaleProviderAdapterback to summary
public CLDRLocaleProviderAdapter()
Annotations
@SuppressWarnings:removal

Method Detail

applyAliasesback to summary
private static Locale applyAliases(Locale loc)
applyParentLocalesback to summary
private List<Locale> applyParentLocales(String baseName, List<Locale> candidates)
canonicalTZIDback to summary
public Optional<String> canonicalTZID(String id)

Returns the canonical ID for the given ID

createLanguageTagSetback to summary
protected Set<String> createLanguageTagSet(String category)

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.createLanguageTagSet.

Annotations
@Override
getAdapterTypeback to summary
public LocaleProviderAdapter.Type getAdapterType()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getAdapterType.

Returns the type of this LocaleProviderAdapter

Returns:LocaleProviderAdapter.Type

the type of this

Annotations
@Override
getAvailableLocalesback to summary
public Locale[] getAvailableLocales()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getAvailableLocales.

Doc from sun.util.locale.provider.JRELocaleProviderAdapter.getAvailableLocales.

Returns a list of the installed locales. Currently, this simply returns the list of locales for which a sun.text.resources.FormatData bundle exists. This bundle family happens to be the one with the broadest locale coverage in the JRE.

Annotations
@Override
getBreakIteratorProviderback to summary
public BreakIteratorProvider getBreakIteratorProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getBreakIteratorProvider.

Doc from sun.util.locale.provider.LocaleProviderAdapter.getBreakIteratorProvider.

Returns a BreakIteratorProvider for this LocaleProviderAdapter, or null if no BreakIteratorProvider is available.

Returns:BreakIteratorProvider

a BreakIteratorProvider

Annotations
@Override
getCalendarDataProviderback to summary
public CalendarDataProvider getCalendarDataProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCalendarDataProvider.

Doc from sun.util.locale.provider.LocaleProviderAdapter.getCalendarDataProvider.

Returns a CalendarDataProvider for this LocaleProviderAdapter, or null if no CalendarDataProvider is available.

Returns:CalendarDataProvider

a CalendarDataProvider

Annotations
@Override
getCalendarNameProviderback to summary
public CalendarNameProvider getCalendarNameProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCalendarNameProvider.

Doc from sun.util.locale.provider.LocaleProviderAdapter.getCalendarNameProvider.

Returns a CalendarNameProvider for this LocaleProviderAdapter, or null if no CalendarNameProvider is available.

Returns:CalendarNameProvider

a CalendarNameProvider

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

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCandidateLocales.

Implements sun.util.locale.provider.ResourceBundleBasedAdapter.getCandidateLocales.

Doc from sun.util.locale.provider.ResourceBundleBasedAdapter.getCandidateLocales.

candidate locales customization

Annotations
@Override
getCollatorProviderback to summary
public CollatorProvider getCollatorProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getCollatorProvider.

Doc from sun.util.locale.provider.LocaleProviderAdapter.getCollatorProvider.

Returns a CollatorProvider for this LocaleProviderAdapter, or null if no CollatorProvider is available.

Returns:CollatorProvider

a collatorProvider

Annotations
@Override
getEquivalentLocback to summary
private static Locale getEquivalentLoc(Locale locale)

This method returns equivalent CLDR supported locale for no, no-NO locales so that COMPAT locales do not precede those locales during ResourceBundle search path, also if an alias exists for a locale, it returns equivalent locale, e.g for zh_HK it returns zh_Hant-HK.

getParentLocaleback to summary
private static Locale getParentLocale(Locale locale)
getTimeZoneNameProviderback to summary
public TimeZoneNameProvider getTimeZoneNameProvider()

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.getTimeZoneNameProvider.

Doc from sun.util.locale.provider.LocaleProviderAdapter.getTimeZoneNameProvider.

Returns a TimeZoneNameProvider for this LocaleProviderAdapter, or null if no TimeZoneNameProvider is available.

Returns:TimeZoneNameProvider

a TimeZoneNameProvider

Annotations
@Override
isSupportedProviderLocaleback to summary
public boolean isSupportedProviderLocale(Locale locale, Set<String> langtags)

Overrides sun.util.locale.provider.JRELocaleProviderAdapter.isSupportedProviderLocale.

Doc from sun.util.locale.provider.LocaleProviderAdapter.isSupportedProviderLocale.

A utility method for implementing the default LocaleServiceProvider.isSupportedLocale for the JRE, CLDR, and FALLBACK adapters.

Annotations
@Override