< prev index next >

src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java

Print this page




  27 
  28 import java.util.ResourceBundle;
  29 
  30 /**
  31  * An interface for service providers that provide implementations of {@link
  32  * java.util.ResourceBundle.Control}. The <a
  33  * href="../ResourceBundle.html#default_behavior">default resource bundle loading
  34  * behavior</a> of the {@code ResourceBundle.getBundle} factory methods that take
  35  * no {@link java.util.ResourceBundle.Control} instance can be modified with {@code
  36  * ResourceBundleControlProvider} implementations.
  37  *
  38  * <p>Provider implementations are loaded from the application's class path
  39  * using {@link java.util.ServiceLoader} at the first invocation of the
  40  * {@code ResourceBundle.getBundle} factory method that takes no
  41  * {@link java.util.ResourceBundle.Control} instance.
  42  *
  43  * <p>All {@code ResourceBundleControlProvider}s are ignored in named modules.
  44  *
  45  * @author Masayoshi Okutsu
  46  * @since 1.8


  47  * @see ResourceBundle#getBundle(String, java.util.Locale, ClassLoader, ResourceBundle.Control)
  48  *      ResourceBundle.getBundle
  49  * @see java.util.ServiceLoader#load(Class)
  50  */
  51 public interface ResourceBundleControlProvider {
  52     /**
  53      * Returns a {@code ResourceBundle.Control} instance that is used
  54      * to handle resource bundle loading for the given {@code
  55      * baseName}. This method must return {@code null} if the given
  56      * {@code baseName} isn't handled by this provider.
  57      *
  58      * @param baseName the base name of the resource bundle
  59      * @return a {@code ResourceBundle.Control} instance,
  60      *         or {@code null} if the given {@code baseName} is not
  61      *         applicable to this provider.
  62      * @throws NullPointerException if {@code baseName} is {@code null}
  63      */
  64     public ResourceBundle.Control getControl(String baseName);
  65 }


  27 
  28 import java.util.ResourceBundle;
  29 
  30 /**
  31  * An interface for service providers that provide implementations of {@link
  32  * java.util.ResourceBundle.Control}. The <a
  33  * href="../ResourceBundle.html#default_behavior">default resource bundle loading
  34  * behavior</a> of the {@code ResourceBundle.getBundle} factory methods that take
  35  * no {@link java.util.ResourceBundle.Control} instance can be modified with {@code
  36  * ResourceBundleControlProvider} implementations.
  37  *
  38  * <p>Provider implementations are loaded from the application's class path
  39  * using {@link java.util.ServiceLoader} at the first invocation of the
  40  * {@code ResourceBundle.getBundle} factory method that takes no
  41  * {@link java.util.ResourceBundle.Control} instance.
  42  *
  43  * <p>All {@code ResourceBundleControlProvider}s are ignored in named modules.
  44  *
  45  * @author Masayoshi Okutsu
  46  * @since 1.8
  47  * @revised 9
  48  * @spec JPMS
  49  * @see ResourceBundle#getBundle(String, java.util.Locale, ClassLoader, ResourceBundle.Control)
  50  *      ResourceBundle.getBundle
  51  * @see java.util.ServiceLoader#load(Class)
  52  */
  53 public interface ResourceBundleControlProvider {
  54     /**
  55      * Returns a {@code ResourceBundle.Control} instance that is used
  56      * to handle resource bundle loading for the given {@code
  57      * baseName}. This method must return {@code null} if the given
  58      * {@code baseName} isn't handled by this provider.
  59      *
  60      * @param baseName the base name of the resource bundle
  61      * @return a {@code ResourceBundle.Control} instance,
  62      *         or {@code null} if the given {@code baseName} is not
  63      *         applicable to this provider.
  64      * @throws NullPointerException if {@code baseName} is {@code null}
  65      */
  66     public ResourceBundle.Control getControl(String baseName);
  67 }
< prev index next >