本文整理汇总了Java中sun.util.locale.provider.LocaleProviderAdapter.forJRE方法的典型用法代码示例。如果您正苦于以下问题:Java LocaleProviderAdapter.forJRE方法的具体用法?Java LocaleProviderAdapter.forJRE怎么用?Java LocaleProviderAdapter.forJRE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.util.locale.provider.LocaleProviderAdapter
的用法示例。
在下文中一共展示了LocaleProviderAdapter.forJRE方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testImplicitCompatLocales
import sun.util.locale.provider.LocaleProviderAdapter; //导入方法依赖的package包/类
/**
* checks that locales nn-NO and nb-NO should be present in list of supported locales for
* all Providers for COMPAT.
*/
private static void testImplicitCompatLocales() {
LocaleProviderAdapter jre = LocaleProviderAdapter.forJRE();
checkPresenceCompat("BreakIteratorProvider",
jre.getBreakIteratorProvider().getAvailableLocales());
checkPresenceCompat("CollatorProvider",
jre.getCollatorProvider().getAvailableLocales());
checkPresenceCompat("DateFormatProvider",
jre.getDateFormatProvider().getAvailableLocales());
checkPresenceCompat("DateFormatSymbolsProvider",
jre.getDateFormatSymbolsProvider().getAvailableLocales());
checkPresenceCompat("DecimalFormatSymbolsProvider",
jre.getDecimalFormatSymbolsProvider().getAvailableLocales());
checkPresenceCompat("NumberFormatProvider",
jre.getNumberFormatProvider().getAvailableLocales());
checkPresenceCompat("CurrencyNameProvider",
jre.getCurrencyNameProvider().getAvailableLocales());
checkPresenceCompat("LocaleNameProvider",
jre.getLocaleNameProvider().getAvailableLocales());
checkPresenceCompat("TimeZoneNameProvider",
jre.getTimeZoneNameProvider().getAvailableLocales());
checkPresenceCompat("CalendarDataProvider",
jre.getCalendarDataProvider().getAvailableLocales());
checkPresenceCompat("CalendarNameProvider",
jre.getCalendarNameProvider().getAvailableLocales());
checkPresenceCompat("CalendarProvider",
jre.getCalendarProvider().getAvailableLocales());
}
示例2: testCompatSupportedLocale
import sun.util.locale.provider.LocaleProviderAdapter; //导入方法依赖的package包/类
/**
* Tests that locale nb should be supported by JRELocaleProvider .
*/
private static void testCompatSupportedLocale() {
LocaleProviderAdapter jre = LocaleProviderAdapter.forJRE();
checkPresenceCompat("BreakIteratorProvider",
jre.getBreakIteratorProvider().getAvailableLocales());
checkPresenceCompat("CollatorProvider",
jre.getCollatorProvider().getAvailableLocales());
checkPresenceCompat("DateFormatProvider",
jre.getDateFormatProvider().getAvailableLocales());
checkPresenceCompat("DateFormatSymbolsProvider",
jre.getDateFormatSymbolsProvider().getAvailableLocales());
checkPresenceCompat("DecimalFormatSymbolsProvider",
jre.getDecimalFormatSymbolsProvider().getAvailableLocales());
checkPresenceCompat("NumberFormatProvider",
jre.getNumberFormatProvider().getAvailableLocales());
checkPresenceCompat("CurrencyNameProvider",
jre.getCurrencyNameProvider().getAvailableLocales());
checkPresenceCompat("LocaleNameProvider",
jre.getLocaleNameProvider().getAvailableLocales());
checkPresenceCompat("TimeZoneNameProvider",
jre.getTimeZoneNameProvider().getAvailableLocales());
checkPresenceCompat("CalendarDataProvider",
jre.getCalendarDataProvider().getAvailableLocales());
checkPresenceCompat("CalendarNameProvider",
jre.getCalendarNameProvider().getAvailableLocales());
checkPresenceCompat("CalendarProvider",
jre.getCalendarProvider().getAvailableLocales());
}
示例3: availableLocalesTests
import sun.util.locale.provider.LocaleProviderAdapter; //导入方法依赖的package包/类
private static void availableLocalesTests() {
LocaleProviderAdapter jre = LocaleProviderAdapter.forJRE();
checkAvailableLocales("BreakIteratorProvider",
jre.getBreakIteratorProvider().getAvailableLocales(), bipLocs);
checkAvailableLocales("CollatorProvider",
jre.getCollatorProvider().getAvailableLocales(), cpLocs);
checkAvailableLocales("DateFormatProvider",
jre.getDateFormatProvider().getAvailableLocales(), dfpLocs);
checkAvailableLocales("DateFormatSymbolsProvider",
jre.getDateFormatSymbolsProvider().getAvailableLocales(), datefspLocs);
checkAvailableLocales("DecimalFormatSymbolsProvider",
jre.getDecimalFormatSymbolsProvider().getAvailableLocales(), decimalfspLocs);
checkAvailableLocales("NumberFormatProvider",
jre.getNumberFormatProvider().getAvailableLocales(), nfpLocs);
checkAvailableLocales("CurrencyNameProvider",
jre.getCurrencyNameProvider().getAvailableLocales(), currencynpLocs);
checkAvailableLocales("LocaleNameProvider",
jre.getLocaleNameProvider().getAvailableLocales(), lnpLocs);
checkAvailableLocales("TimeZoneNameProvider",
jre.getTimeZoneNameProvider().getAvailableLocales(), tznpLocs);
checkAvailableLocales("CalendarDataProvider",
jre.getCalendarDataProvider().getAvailableLocales(), caldpLocs);
checkAvailableLocales("CalendarNameProvider",
jre.getCalendarNameProvider().getAvailableLocales(), calnpLocs);
checkAvailableLocales("CalendarProvider",
jre.getCalendarProvider().getAvailableLocales(), calpLocs);
}