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/Apackage java.text.spi;
0N/A
0N/Aimport java.text.DateFormat;
0N/Aimport java.util.Locale;
0N/Aimport java.util.spi.LocaleServiceProvider;
0N/A
0N/A/**
0N/A * An abstract class for service providers that
0N/A * provide concrete implementations of the
0N/A * {@link java.text.DateFormat DateFormat} class.
0N/A *
0N/A * @since 1.6
0N/A */
0N/Apublic abstract class DateFormatProvider extends LocaleServiceProvider {
0N/A
0N/A /**
0N/A * Sole constructor. (For invocation by subclass constructors, typically
0N/A * implicit.)
0N/A */
0N/A protected DateFormatProvider() {
0N/A }
0N/A
0N/A /**
0N/A * Returns a new <code>DateFormat</code> instance which formats time
0N/A * with the given formatting style for the specified locale.
0N/A * @param style the given formatting style. Either one of
0N/A * {@link java.text.DateFormat#SHORT DateFormat.SHORT},
0N/A * {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM},
0N/A * {@link java.text.DateFormat#LONG DateFormat.LONG}, or
0N/A * {@link java.text.DateFormat#FULL DateFormat.FULL}.
0N/A * @param locale the desired locale.
0N/A * @exception IllegalArgumentException if <code>style</code> is invalid,
0N/A * or if <code>locale</code> isn't
0N/A * one of the locales returned from
0N/A * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
0N/A * getAvailableLocales()}.
0N/A * @exception NullPointerException if <code>locale</code> is null
0N/A * @return a time formatter.
0N/A * @see java.text.DateFormat#getTimeInstance(int, java.util.Locale)
0N/A */
0N/A public abstract DateFormat getTimeInstance(int style, Locale locale);
0N/A
0N/A /**
0N/A * Returns a new <code>DateFormat</code> instance which formats date
0N/A * with the given formatting style for the specified locale.
0N/A * @param style the given formatting style. Either one of
0N/A * {@link java.text.DateFormat#SHORT DateFormat.SHORT},
0N/A * {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM},
0N/A * {@link java.text.DateFormat#LONG DateFormat.LONG}, or
0N/A * {@link java.text.DateFormat#FULL DateFormat.FULL}.
0N/A * @param locale the desired locale.
0N/A * @exception IllegalArgumentException if <code>style</code> is invalid,
0N/A * or if <code>locale</code> isn't
0N/A * one of the locales returned from
0N/A * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
0N/A * getAvailableLocales()}.
0N/A * @exception NullPointerException if <code>locale</code> is null
0N/A * @return a date formatter.
0N/A * @see java.text.DateFormat#getDateInstance(int, java.util.Locale)
0N/A */
0N/A public abstract DateFormat getDateInstance(int style, Locale locale);
0N/A
0N/A /**
0N/A * Returns a new <code>DateFormat</code> instance which formats date and time
0N/A * with the given formatting style for the specified locale.
0N/A * @param dateStyle the given date formatting style. Either one of
0N/A * {@link java.text.DateFormat#SHORT DateFormat.SHORT},
0N/A * {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM},
0N/A * {@link java.text.DateFormat#LONG DateFormat.LONG}, or
0N/A * {@link java.text.DateFormat#FULL DateFormat.FULL}.
0N/A * @param timeStyle the given time formatting style. Either one of
0N/A * {@link java.text.DateFormat#SHORT DateFormat.SHORT},
0N/A * {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM},
0N/A * {@link java.text.DateFormat#LONG DateFormat.LONG}, or
0N/A * {@link java.text.DateFormat#FULL DateFormat.FULL}.
0N/A * @param locale the desired locale.
0N/A * @exception IllegalArgumentException if <code>dateStyle</code> or
0N/A * <code>timeStyle</code> is invalid,
0N/A * or if <code>locale</code> isn't
0N/A * one of the locales returned from
0N/A * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
0N/A * getAvailableLocales()}.
0N/A * @exception NullPointerException if <code>locale</code> is null
0N/A * @return a date/time formatter.
0N/A * @see java.text.DateFormat#getDateTimeInstance(int, int, java.util.Locale)
0N/A */
0N/A public abstract DateFormat
0N/A getDateTimeInstance(int dateStyle, int timeStyle, Locale locale);
0N/A}