public class ComposedNlsMessage extends AbstractNlsMessage
NlsMessage for composing other objects or messages.| Modifier and Type | Field and Description |
|---|---|
private Object[] |
arguments |
private static long |
serialVersionUID |
LOCALE_ROOTLOCALIZATION_FAILURE_PREFIXKEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERAND, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
ComposedNlsMessage()
The constructor for de-serialization in GWT.
|
|
ComposedNlsMessage(Object[] arguments)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getArgument(int index)
This method gets the
Argument for the given index. |
Object |
getArgument(String key)
This method gets the language independent argument value for the given
key. |
int |
getArgumentCount()
This method gets the number of language independent arguments of this exception.
|
String |
getInternationalizedMessage()
This method gets the internationalized message what is the actual message template for the
root
locale without resolving its NlsArguments. |
void |
getLocalizedMessage(Locale locale,
NlsTemplateResolver resolver,
Appendable buffer)
This method writes the localized message to the given
buffer. |
getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessage, toNlsMessage, toStringprivate static final long serialVersionUID
private Object[] arguments
protected ComposedNlsMessage()
public Object getArgument(int index)
AbstractNlsMessageArgument for the given index.getArgument in interface NlsMessagegetArgument in class AbstractNlsMessageindex - is the index of the requested argument.null if no such argument exists.public int getArgumentCount()
NlsMessagegetArgumentCount in interface NlsMessagegetArgumentCount in class AbstractNlsMessagepublic String getInternationalizedMessage()
NlsMessageroot
locale without resolving its NlsArguments."Welcome {name}!").NlsMessage,
NlsMessage.getArgument(String),
MessageFormatpublic Object getArgument(String key)
NlsMessagekey.key - is the name of the requested argument.null if NOT defined.NlsArgumentpublic void getLocalizedMessage(Locale locale, NlsTemplateResolver resolver, Appendable buffer) throws RuntimeIoException
NlsMessagebuffer. template that is provided via the given resolver.
If this fails, the original message will be used. After translation is done,
the language independent arguments will be filled in the translated message string according to the given
locale.locale - is the locale to translate to.resolver - is used to resolve the template required to translate the internationalized message.buffer - is the buffer where to write the message to.RuntimeIoExceptionCopyright © 2001–2016 mmm-Team. All rights reserved.