|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.ResourceBundle
org.springframework.context.support.MessageSourceResourceBundle
public class MessageSourceResourceBundle
Helper class that allows for accessing a Spring
MessageSource
as a ResourceBundle
.
Used for example to expose a Spring MessageSource to JSTL web views.
MessageSource
,
ResourceBundle
,
JstlUtils.exposeLocalizationContext(javax.servlet.http.HttpServletRequest, org.springframework.context.MessageSource)
Field Summary |
---|
Fields inherited from class java.util.ResourceBundle |
---|
parent |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
Enumeration |
getKeys()
This implementation returns null , as a MessageSource does
not allow for enumerating the defined message codes. |
Locale |
getLocale()
This implementation exposes the specified Locale for introspection through the standard ResourceBundle.getLocale() method. |
protected Object |
handleGetObject(String code)
This implementation resolves the code in the MessageSource. |
Methods inherited from class java.util.ResourceBundle |
---|
getBundle, getBundle, getBundle, getObject, getString, getStringArray, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageSourceResourceBundle(MessageSource source, Locale locale)
source
- the MessageSource to retrieve messages fromlocale
- the Locale to retrieve messages forpublic MessageSourceResourceBundle(MessageSource source, Locale locale, ResourceBundle parent)
source
- the MessageSource to retrieve messages fromlocale
- the Locale to retrieve messages forparent
- the parent ResourceBundle to delegate to if no local message foundMethod Detail |
---|
protected Object handleGetObject(String code)
null
if the message could not be resolved.
handleGetObject
in class ResourceBundle
public Enumeration getKeys()
null
, as a MessageSource does
not allow for enumerating the defined message codes.
getKeys
in class ResourceBundle
public Locale getLocale()
ResourceBundle.getLocale()
method.
getLocale
in class ResourceBundle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |