当前位置: 首页>>代码示例>>Java>>正文


Java LocaleProviderAdapter.forJRE方法代码示例

本文整理汇总了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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:Bug8167143.java

示例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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:Bug8167273.java

示例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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:Bug8038436.java


注:本文中的sun.util.locale.provider.LocaleProviderAdapter.forJRE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。