public class ResourceBundleMessageSource extends Object implements MessageSource
ResourceBundle instances.| Constructor and Description |
|---|
ResourceBundleMessageSource(Class... types) |
ResourceBundleMessageSource(Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
ResourceBundleMessageSource |
add(boolean required,
Class... types) |
ResourceBundleMessageSource |
add(Class... types) |
String |
format(String code,
Object... args)
Format a message (based on
MessageFormat using the message
from the resource bundles using the given code as a pattern and the
given objects as arguments. |
Locale |
getLocale() |
String |
getMessage(String code)
Get a raw message from the resource bundles using the given code.
|
public ResourceBundleMessageSource(Locale locale)
public ResourceBundleMessageSource(Class... types)
public ResourceBundleMessageSource add(boolean required, Class... types)
public Locale getLocale()
public ResourceBundleMessageSource add(Class... types)
public String getMessage(String code)
getMessage in interface MessageSourcepublic String format(String code, Object... args)
MessageFormat using the message
from the resource bundles using the given code as a pattern and the
given objects as arguments.format in interface MessageSourceCopyright © 2008-2012 Sonatype. All Rights Reserved.