public class ResourceMessageResolver extends Object implements MessageResolver
DEFAULT
Constructor and Description |
---|
ResourceMessageResolver(org.foxlabs.util.resource.MessageBundle bundle)
Constructs a new
ResourceMessageResolver with the specified
message bundle. |
ResourceMessageResolver(String bundleName)
Constructs a new
ResourceMessageResolver with the specified
message bundle name. |
Modifier and Type | Method and Description |
---|---|
String |
resolveMessage(String key,
Locale locale)
Returns message for the specified key and locale.
|
public ResourceMessageResolver(String bundleName)
ResourceMessageResolver
with the specified
message bundle name.bundleName
- Message bundle name.public ResourceMessageResolver(org.foxlabs.util.resource.MessageBundle bundle)
ResourceMessageResolver
with the specified
message bundle.bundle
- Message bundle.public String resolveMessage(String key, Locale locale)
resolveMessage
in interface MessageResolver
key
- Message key.locale
- Message locale.MissingResourceException
- if message for the specified key is
not found in provided message bundle.Copyright © 2011–2020 FoxLabs. All rights reserved.