类 MessageSourceResourceBundle
java.lang.Object
java.util.ResourceBundle
cn.taketoday.context.support.MessageSourceResourceBundle
Helper class that allows for accessing a Framework
MessageSource as a ResourceBundle.
Used for example to expose a Framework MessageSource to JSTL web views.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 java.util.ResourceBundle
ResourceBundle.Control -
字段概要
从类继承的字段 java.util.ResourceBundle
parent -
构造器概要
构造器构造器说明MessageSourceResourceBundle(MessageSource source, Locale locale) Create a new MessageSourceResourceBundle for the given MessageSource and Locale.MessageSourceResourceBundle(MessageSource source, Locale locale, ResourceBundle parent) Create a new MessageSourceResourceBundle for the given MessageSource and Locale. -
方法概要
修饰符和类型方法说明booleancontainsKey(String key) This implementation checks whether the target MessageSource can resolve a message for the given key, translatingNoSuchMessageExceptionaccordingly.getKeys()This implementation throwsUnsupportedOperationException, as a MessageSource does not allow for enumerating the defined message codes.This implementation exposes the specified Locale for introspection through the standardResourceBundle.getLocale()method.protected ObjecthandleGetObject(String key) This implementation resolves the code in the MessageSource.从类继承的方法 java.util.ResourceBundle
clearCache, clearCache, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getObject, getString, getStringArray, handleKeySet, keySet, setParent
-
构造器详细资料
-
MessageSourceResourceBundle
Create a new MessageSourceResourceBundle for the given MessageSource and Locale.- 参数:
source- the MessageSource to retrieve messages fromlocale- the Locale to retrieve messages for
-
MessageSourceResourceBundle
Create a new MessageSourceResourceBundle for the given MessageSource and Locale.- 参数:
source- the MessageSource to retrieve messages fromlocale- the Locale to retrieve messages forparent- the parent ResourceBundle to delegate to if no local message found
-
-
方法详细资料
-
handleGetObject
This implementation resolves the code in the MessageSource. Returnsnullif the message could not be resolved.- 指定者:
handleGetObject在类中ResourceBundle
-
containsKey
This implementation checks whether the target MessageSource can resolve a message for the given key, translatingNoSuchMessageExceptionaccordingly. In contrast to ResourceBundle's default implementation in JDK 1.6, this does not rely on the capability to enumerate message keys.- 覆盖:
containsKey在类中ResourceBundle
-
getKeys
This implementation throwsUnsupportedOperationException, as a MessageSource does not allow for enumerating the defined message codes.- 指定者:
getKeys在类中ResourceBundle
-
getLocale
This implementation exposes the specified Locale for introspection through the standardResourceBundle.getLocale()method.- 覆盖:
getLocale在类中ResourceBundle
-