0N/A/*
2362N/A * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A#warn This file is preprocessed before being compiled
0N/A
0N/A/*
0N/A * This class contains a map which records the locale list string for
0N/A * each resource in sun.util.resources & sun.text.resources.
0N/A * It is used to avoid loading non-existent localized resources so that
0N/A * jar files won't be opened unnecessary to look up them.
0N/A *
0N/A * @since 1.6
0N/A */
0N/Apackage sun.util;
0N/A
0N/Aimport java.util.HashMap;
0N/A
0N/A
0N/Apublic class LocaleDataMetaInfo {
0N/A
0N/A private static final HashMap<String, String> resourceNameToLocales =
0N/A new HashMap<String, String>(6);
0N/A
0N/A
0N/A static {
0N/A /* During JDK build time, #XXX_YYY# will be replaced by a string contain all the locales
0N/A supported by the resource.
0N/A
0N/A Don't remove the space character between " and #. That is put there purposely so that
0N/A look up locale string such as "en" could be based on if it contains " en ".
0N/A */
0N/A resourceNameToLocales.put("sun.text.resources.FormatData",
0N/A " #FormatData_EuroLocales# | #FormatData_NonEuroLocales# ");
0N/A
0N/A resourceNameToLocales.put("sun.text.resources.CollationData",
0N/A " #CollationData_EuroLocales# | #CollationData_NonEuroLocales# ");
0N/A
0N/A resourceNameToLocales.put("sun.util.resources.TimeZoneNames",
0N/A " #TimeZoneNames_EuroLocales# | #TimeZoneNames_NonEuroLocales# ");
0N/A
0N/A resourceNameToLocales.put("sun.util.resources.LocaleNames",
0N/A " #LocaleNames_EuroLocales# | #LocaleNames_NonEuroLocales# ");
0N/A
0N/A resourceNameToLocales.put("sun.util.resources.CurrencyNames",
0N/A " #CurrencyNames_EuroLocales# | #CurrencyNames_NonEuroLocales# ");
0N/A
0N/A resourceNameToLocales.put("sun.util.resources.CalendarData",
0N/A " #CalendarData_EuroLocales# | #CalendarData_NonEuroLocales# ");
0N/A }
0N/A
0N/A /*
0N/A * @param resourceName the resource name
0N/A * @return the supported locale string for the passed in resource.
0N/A */
0N/A public static String getSupportedLocaleString(String resourceName) {
0N/A
0N/A return resourceNameToLocales.get(resourceName);
0N/A }
0N/A
0N/A}