org.springframework.context.MessageSource as a java.util.ResourceBundle .
Used for example to expose a Spring MessageSource to JSTL web views.
org.springframework.context.MessageSource , java.util.ResourceBundle , org.springframework.web.servlet.support.JstlUtils#exposeLocalizationContext
| Modifier and Type | Field and Description |
|---|---|
| private final Locale | |
| private final MessageSource |
| Access | Constructor and Description |
|---|---|
| public | MessageSourceResourceBundle(MessageSource
the MessageSource to retrieve messages from source, Locale the Locale to retrieve messages for locale)Create a new MessageSourceResourceBundle for the given MessageSource and Locale. |
| public | MessageSourceResourceBundle(MessageSource
the MessageSource to retrieve messages from source, Locale the Locale to retrieve messages for locale, ResourceBundle the parent ResourceBundle to delegate to if no local message found parent)Create a new MessageSourceResourceBundle for the given MessageSource and Locale. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(String
the resource key)keyOverrides java. NoSuchMessageException
accordingly.
|
| public Enumeration | getKeys()
Implements abstract java. UnsupportedOperationException,
as a MessageSource does not allow for enumerating the defined message codes.
|
| public Locale | getLocale()
Overrides java. ResourceBundle.getLocale() method.
|
| protected Object | handleGetObject(String
the key for the desired object key)Implements abstract java. |
| locale | back to summary |
|---|---|
| private final Locale locale | |
| messageSource | back to summary |
|---|---|
| private final MessageSource messageSource | |
| MessageSourceResourceBundle | back to summary |
|---|---|
| public MessageSourceResourceBundle(MessageSource source, Locale locale) Create a new MessageSourceResourceBundle for the given MessageSource and Locale.
| |
| MessageSourceResourceBundle | back to summary |
|---|---|
| public MessageSourceResourceBundle(MessageSource source, Locale locale, ResourceBundle parent) Create a new MessageSourceResourceBundle for the given MessageSource and Locale.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(String key) Overrides java. This implementation checks whether the target MessageSource can resolve
a message for the given key, translating
| |
| getKeys | back to summary |
|---|---|
| public Enumeration Implements abstract java. This implementation throws
| |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Overrides java. This implementation exposes the specified Locale for introspection
through the standard
| |
| handleGetObject | back to summary |
|---|---|
| protected Object handleGetObject(String key) Implements abstract java. This implementation resolves the code in the MessageSource.
Returns
| |