类 MessageSourceResourceBundle

    • 构造器详细资料

      • MessageSourceResourceBundle

        public MessageSourceResourceBundle​(MessageSource source,
                                           Locale locale)
        Create a new MessageSourceResourceBundle for the given MessageSource and Locale.
        参数:
        source - the MessageSource to retrieve messages from
        locale - the Locale to retrieve messages for
      • MessageSourceResourceBundle

        public MessageSourceResourceBundle​(MessageSource source,
                                           Locale locale,
                                           ResourceBundle parent)
        Create a new MessageSourceResourceBundle for the given MessageSource and Locale.
        参数:
        source - the MessageSource to retrieve messages from
        locale - the Locale to retrieve messages for
        parent - the parent ResourceBundle to delegate to if no local message found
    • 方法详细资料

      • containsKey

        public boolean containsKey​(String key)
        This implementation checks whether the target MessageSource can resolve a message for the given key, translating NoSuchMessageException accordingly. In contrast to ResourceBundle's default implementation in JDK 1.6, this does not rely on the capability to enumerate message keys.
        覆盖:
        containsKey 在类中 ResourceBundle
      • getLocale

        public Locale getLocale()
        This implementation exposes the specified Locale for introspection through the standard ResourceBundle.getLocale() method.
        覆盖:
        getLocale 在类中 ResourceBundle