src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java

Print this page




  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.util.locale.provider;
  27 
  28 import java.security.AccessController;
  29 import java.text.spi.BreakIteratorProvider;
  30 import java.text.spi.CollatorProvider;
  31 import java.text.spi.DateFormatProvider;
  32 import java.text.spi.DateFormatSymbolsProvider;
  33 import java.text.spi.DecimalFormatSymbolsProvider;
  34 import java.text.spi.NumberFormatProvider;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.Locale;
  38 import java.util.ResourceBundle;
  39 import java.util.Set;
  40 import java.util.spi.CalendarDataProvider;

  41 import java.util.spi.CurrencyNameProvider;
  42 import java.util.spi.LocaleNameProvider;
  43 import java.util.spi.LocaleServiceProvider;
  44 import java.util.spi.TimeZoneNameProvider;
  45 import sun.util.cldr.CLDRLocaleProviderAdapter;
  46 import sun.util.resources.LocaleData;
  47 
  48 /**
  49  * The LocaleProviderAdapter abstract class.
  50  *
  51  * @author Naoto Sato
  52  * @author Masayoshi Okutsu
  53  */
  54 public abstract class LocaleProviderAdapter {
  55     /**
  56      * Adapter type.
  57      */
  58     public static enum Type {
  59         JRE("sun.util.resources", "sun.text.resources"),
  60         CLDR("sun.util.resources.cldr", "sun.text.resources.cldr"),


 369      *
 370      * @return a LocaleNameProvider
 371      */
 372     public abstract LocaleNameProvider getLocaleNameProvider();
 373 
 374     /**
 375      * Returns a TimeZoneNameProvider for this LocaleProviderAdapter, or null if no
 376      * TimeZoneNameProvider is available.
 377      *
 378      * @return a TimeZoneNameProvider
 379      */
 380     public abstract TimeZoneNameProvider getTimeZoneNameProvider();
 381 
 382     /**
 383      * Returns a CalendarDataProvider for this LocaleProviderAdapter, or null if no
 384      * CalendarDataProvider is available.
 385      *
 386      * @return a CalendarDataProvider
 387      */
 388     public abstract CalendarDataProvider getCalendarDataProvider();








 389 
 390     public abstract LocaleResources getLocaleResources(Locale locale);
 391 
 392     public abstract LocaleData getLocaleData();
 393 
 394     public abstract Locale[] getAvailableLocales();
 395 }


  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.util.locale.provider;
  27 
  28 import java.security.AccessController;
  29 import java.text.spi.BreakIteratorProvider;
  30 import java.text.spi.CollatorProvider;
  31 import java.text.spi.DateFormatProvider;
  32 import java.text.spi.DateFormatSymbolsProvider;
  33 import java.text.spi.DecimalFormatSymbolsProvider;
  34 import java.text.spi.NumberFormatProvider;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.Locale;
  38 import java.util.ResourceBundle;
  39 import java.util.Set;
  40 import java.util.spi.CalendarDataProvider;
  41 import java.util.spi.CalendarNameProvider;
  42 import java.util.spi.CurrencyNameProvider;
  43 import java.util.spi.LocaleNameProvider;
  44 import java.util.spi.LocaleServiceProvider;
  45 import java.util.spi.TimeZoneNameProvider;
  46 import sun.util.cldr.CLDRLocaleProviderAdapter;
  47 import sun.util.resources.LocaleData;
  48 
  49 /**
  50  * The LocaleProviderAdapter abstract class.
  51  *
  52  * @author Naoto Sato
  53  * @author Masayoshi Okutsu
  54  */
  55 public abstract class LocaleProviderAdapter {
  56     /**
  57      * Adapter type.
  58      */
  59     public static enum Type {
  60         JRE("sun.util.resources", "sun.text.resources"),
  61         CLDR("sun.util.resources.cldr", "sun.text.resources.cldr"),


 370      *
 371      * @return a LocaleNameProvider
 372      */
 373     public abstract LocaleNameProvider getLocaleNameProvider();
 374 
 375     /**
 376      * Returns a TimeZoneNameProvider for this LocaleProviderAdapter, or null if no
 377      * TimeZoneNameProvider is available.
 378      *
 379      * @return a TimeZoneNameProvider
 380      */
 381     public abstract TimeZoneNameProvider getTimeZoneNameProvider();
 382 
 383     /**
 384      * Returns a CalendarDataProvider for this LocaleProviderAdapter, or null if no
 385      * CalendarDataProvider is available.
 386      *
 387      * @return a CalendarDataProvider
 388      */
 389     public abstract CalendarDataProvider getCalendarDataProvider();
 390 
 391     /**
 392      * Returns a CalendarNameProvider for this LocaleProviderAdapter, or null if no
 393      * CalendarNameProvider is available.
 394      *
 395      * @return a CalendarNameProvider
 396      */
 397     public abstract CalendarNameProvider getCalendarNameProvider();
 398 
 399     public abstract LocaleResources getLocaleResources(Locale locale);
 400 
 401     public abstract LocaleData getLocaleData();
 402 
 403     public abstract Locale[] getAvailableLocales();
 404 }