项目:openjdk-jdk10
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = AccessController.doPrivileged(
(PrivilegedAction<DecimalFormatSymbolsProvider>) () ->
new DecimalFormatSymbolsProviderImpl(
getAdapterType(),getLanguageTagSet("FormatData")));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:openjdk9
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = AccessController.doPrivileged(
(PrivilegedAction<DecimalFormatSymbolsProvider>) () ->
new DecimalFormatSymbolsProviderImpl(
getAdapterType(),getLanguageTagSet("FormatData")));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:VarJ
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
项目:jdk-1.7-annotated
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
项目:jdk7-jdk
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
项目:openjdk-source-code-learn
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
项目:cn1
文件:DecimalFormatSymbols.java
/**
* Return the DecimalFormatSymbols for the specified locale. This method
* return DecimalFormatSymbols instances for locales supported by the Java
* runtime and installed DecimalFormatSymbolsProvider implementations.
*
* @param locale
* locale for the returned DecimalFormatSymbols instance
*
* @return an instance of DecimalFormatSymbols
*
* @exception NullPointerException
* if locale is null
*
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
if (null == locale) {
throw new NullPointerException();
}
if (buildinLocales == null) {
initBuildInLocales(com.ibm.icu.text.DecimalFormatSymbols
.getAvailableLocales());
}
if (buildinLocales.contains(locale)) {
return new DecimalFormatSymbols(locale);
}
DecimalFormatSymbolsProvider provider = (DecimalFormatSymbolsProvider) LocaleServiceProviderLoader
.getProviderByLocale(providersCache,locale,PROVIDER_CONfigURATION_FILE_NAME);
if (provider != null) {
return provider.getInstance(locale);
}
// return DecimalFormatSymbols using default locale
return new DecimalFormatSymbols();
}
项目:openjdk-jdk7u-jdk
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
项目:openjdk-icedtea7
文件:DecimalFormatSymbols.java
/**
* Gets the <code>DecimalFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DecimalFormatSymbols</code>
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DecimalFormatSymbolsProvider
* DecimalFormatSymbolsProvider} implementations.
* @param locale the desired locale.
* @return a <code>DecimalFormatSymbols</code> instance.
* @exception NullPointerException if <code>locale</code> is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
// Check whether a provider can provide an implementation that's closer
// to the requested locale than what the Java runtime itself can provide.
LocaleServiceProviderPool pool =
LocaleServiceProviderPool.getPool(DecimalFormatSymbolsProvider.class);
if (pool.hasProviders()) {
DecimalFormatSymbols providersInstance = pool.getLocalizedobject(
DecimalFormatSymbolsGetter.INSTANCE,locale);
if (providersInstance != null) {
return providersInstance;
}
}
return new DecimalFormatSymbols(locale);
}
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:jdk8u-jdk
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:openjdk-jdk10
文件:DecimalFormatSymbols.java
/**
* Initializes the symbols from the FormatData resource bundle.
*/
private void initialize( Locale locale ) {
this.locale = locale;
// get resource bundle data
LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class,locale);
// Avoid potential recursions
if (!(adapter instanceof ResourceBundleBasedAdapter)) {
adapter = LocaleProviderAdapter.getResourceBundleBased();
}
Object[] data = adapter.getLocaleResources(locale).getDecimalFormatSymbolsData();
String[] numberElements = (String[]) data[0];
decimalSeparator = numberElements[0].charat(0);
groupingSeparator = numberElements[1].charat(0);
patternSeparator = numberElements[2].charat(0);
percent = numberElements[3].charat(0);
zeroDigit = numberElements[4].charat(0); //different for arabic,etc.
digit = numberElements[5].charat(0);
minusSign = numberElements[6].charat(0);
exponential = numberElements[7].charat(0);
exponentialSeparator = numberElements[7]; //string representation new since 1.6
perMill = numberElements[8].charat(0);
infinity = numberElements[9];
NaN = numberElements[10];
// maybe filled with prevIoUsly cached values,or null.
intlCurrencySymbol = (String) data[1];
currencySymbol = (String) data[2];
// Currently the monetary decimal separator is the same as the
// standard decimal separator for all locales that we support.
// If that changes,add a new entry to NumberElements.
monetarySeparator = decimalSeparator;
}
项目:openjdk9
文件:DecimalFormatSymbols.java
/**
* Initializes the symbols from the FormatData resource bundle.
*/
private void initialize( Locale locale ) {
this.locale = locale;
// get resource bundle data
LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class,add a new entry to NumberElements.
monetarySeparator = decimalSeparator;
}
项目:jdk8u_jdk
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:lookaside_java-1.8.0-openjdk
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:javify
文件:DecimalFormatSymbols.java
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DecimalFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale)
{
try
{
if (!locale.equals(Locale.ROOT))
ResourceBundle.getBundle("gnu.java.locale.Locale@R_642_4045@ion",ClassLoader.getSystemClassLoader());
return new DecimalFormatSymbols(locale);
}
catch (MissingResourceException x)
{
/* This means runtime support for the locale
* is not available,so we check providers. */
}
for (DecimalFormatSymbolsProvider p :
ServiceLoader.load(DecimalFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DecimalFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
项目:jvm-stm
文件:DecimalFormatSymbols.java
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DecimalFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale)
{
try
{
if (!locale.equals(Locale.ROOT))
ResourceBundle.getBundle("gnu.java.locale.Locale@R_642_4045@ion",ClassLoader.getSystemClassLoader());
return new DecimalFormatSymbols(locale);
}
catch (MissingResourceException x)
{
/* This means runtime support for the locale
* is not available,so we check providers. */
}
for (DecimalFormatSymbolsProvider p :
ServiceLoader.load(DecimalFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DecimalFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
项目:VarJ
文件:DecimalFormatSymbols.java
项目:jdk-1.7-annotated
文件:DecimalFormatSymbols.java
项目:infobip-open-jdk-8
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:jdk8u-dev-jdk
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:jdk7-jdk
文件:DecimalFormatSymbols.java
项目:openjdk-source-code-learn
文件:DecimalFormatSymbols.java
项目:OLD-OpenJDK8
文件:JRELocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(),getLanguageTagSet("FormatData"));
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
}
}
}
return decimalFormatSymbolsProvider;
}
项目:JamVM-PH
文件:DecimalFormatSymbols.java
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DecimalFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale)
{
try
{
if (!locale.equals(Locale.ROOT))
ResourceBundle.getBundle("gnu.java.locale.Locale@R_642_4045@ion",so we check providers. */
}
for (DecimalFormatSymbolsProvider p :
ServiceLoader.load(DecimalFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DecimalFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
项目:openjdk-jdk7u-jdk
文件:DecimalFormatSymbols.java
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DecimalFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale)
{
try
{
if (!locale.equals(Locale.ROOT))
ResourceBundle.getBundle("gnu.java.locale.Locale@R_642_4045@ion",so we check providers. */
}
for (DecimalFormatSymbolsProvider p :
ServiceLoader.load(DecimalFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DecimalFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
项目:openjdk-icedtea7
文件:DecimalFormatSymbols.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
return getLocaleServiceProvider(DecimalFormatSymbolsProvider.class);
}
@Override
public void addImpl(DecimalFormatSymbolsProvider impl) {
for (Locale l : impl.getAvailableLocales()) {
map.putIfAbsent(l,impl);
}
}
@Override
public DecimalFormatSymbolsProvider getImpl(Locale locale) {
return SPILocaleProviderAdapter.getImpl(map,locale);
}
项目:jdk8u-jdk
文件:AuxLocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
return getLocaleServiceProvider(DecimalFormatSymbolsProvider.class);
}
项目:jdk8u-jdk
文件:SPILocaleProviderAdapter.java
@Override
public void addImpl(DecimalFormatSymbolsProvider impl) {
for (Locale l : impl.getAvailableLocales()) {
map.putIfAbsent(l,impl);
}
}
项目:jdk8u-jdk
文件:SPILocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getImpl(Locale locale) {
return SPILocaleProviderAdapter.getImpl(map,locale);
}
项目:openjdk-jdk10
文件:AuxLocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
return getLocaleServiceProvider(DecimalFormatSymbolsProvider.class);
}
项目:openjdk-jdk10
文件:SPILocaleProviderAdapter.java
@Override
public void addImpl(DecimalFormatSymbolsProvider impl) {
for (Locale l : impl.getAvailableLocales()) {
map.putIfAbsent(l,impl);
}
}
项目:openjdk-jdk10
文件:SPILocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getImpl(Locale locale) {
return SPILocaleProviderAdapter.getImpl(map,locale);
}
项目:openjdk9
文件:AuxLocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
return getLocaleServiceProvider(DecimalFormatSymbolsProvider.class);
}
项目:openjdk9
文件:SPILocaleProviderAdapter.java
@Override
public void addImpl(DecimalFormatSymbolsProvider impl) {
for (Locale l : impl.getAvailableLocales()) {
map.putIfAbsent(l,impl);
}
}
项目:openjdk9
文件:SPILocaleProviderAdapter.java
@Override
public DecimalFormatSymbolsProvider getImpl(Locale locale) {
return SPILocaleProviderAdapter.getImpl(map,locale);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。