jdk/src/share/classes/java/util/spi/ResourceBundleControlProvider.java
author okutsu
Mon, 10 Dec 2012 10:52:11 +0900
changeset 14765 0987999ed367
parent 13029 dfd934f86768
permissions -rw-r--r--
8000983: Support narrow display names for calendar fields 8003267: Support generic time zone names in TimeZoneNameProvider (SPI) Reviewed-by: naoto
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13029
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     1
/*
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     4
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    10
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    15
 * accompanied this code).
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    16
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    20
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    23
 * questions.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    24
 */
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    25
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    26
package java.util.spi;
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    27
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    28
import java.util.ResourceBundle;
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    29
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    30
/**
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    31
 * An interface for service providers that provide implementations of {@link
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    32
 * java.util.ResourceBundle.Control}. The <a
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    33
 * href="../ResourceBundle.html#default_behavior">default resource bundle loading
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    34
 * behavior</a> of the {@code ResourceBundle.getBundle} factory methods that take
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    35
 * no {@link java.util.ResourceBundle.Control} instance can be modified with {@code
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    36
 * ResourceBundleControlProvider} implementations.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    37
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    38
 * <p>Provider implementations must be packaged using the <a
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    39
 * href="../../../../technotes/guides/extensions/index.html">Java Extension
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    40
 * Mechanism</a> as installed extensions. Refer to {@link java.util.ServiceLoader}
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    41
 * for the extension packaging. Any installed {@code
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    42
 * ResourceBundleControlProvider} implementations are loaded using {@link
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    43
 * java.util.ServiceLoader} at the {@code ResourceBundle} class loading time.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    44
 *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    45
 * @author Masayoshi Okutsu
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    46
 * @since 1.8
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    47
 * @see ResourceBundle#getBundle(String, java.util.Locale, ClassLoader, ResourceBundle.Control)
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    48
 *      ResourceBundle.getBundle
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    49
 * @see java.util.ServiceLoader#loadInstalled(Class)
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    50
 */
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    51
public interface ResourceBundleControlProvider {
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    52
    /**
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    53
     * Returns a {@code ResourceBundle.Control} instance that is used
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    54
     * to handle resource bundle loading for the given {@code
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    55
     * baseName}. This method must return {@code null} if the given
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    56
     * {@code baseName} isn't handled by this provider.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    57
     *
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    58
     * @param baseName the base name of the resource bundle
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    59
     * @return a {@code ResourceBundle.Control} instance,
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    60
     *         or {@code null} if the given {@code baseName} is not
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    61
     *         applicable to this provider.
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    62
     * @throws NullPointerException if {@code baseName} is {@code null}
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    63
     */
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    64
    public ResourceBundle.Control getControl(String baseName);
dfd934f86768 6380549: (rb) ResourceBundle.Control global binding support
okutsu
parents:
diff changeset
    65
}