public class MessageKeyLocalizedMessage extends Object implements LocalizedMessage, LocalizationChangeObservable
ResourceBundleManager
for localization.Constructor and Description |
---|
MessageKeyLocalizedMessage(String messageKey,
Object... arguments)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object[] |
getArguments() |
Class<ResourceBundleChangedEvent> |
getChangeNotificationEvent()
Return the event type that will be fired when the localizations which are used by this
component have changed.
This event type can be used to register an event listener to be notified about the changes of the localizations which is for instance useful when doing some local caching of localized content. |
String |
getMessageKey() |
boolean |
isCombineArguments() |
void |
setArguments(Object[] arguments) |
void |
setCombineArguments(boolean combineArguments)
Whether to combine the the arguments passed to toString with those set via setArguments.
|
void |
setMessageKey(String messageKey) |
String |
toString() |
String |
toString(Locale locale,
Object... arguments)
Returns the localized message.
|
public Object[] getArguments()
public Class<ResourceBundleChangedEvent> getChangeNotificationEvent()
LocalizationChangeObservable
getChangeNotificationEvent
in interface LocalizationChangeObservable
public String getMessageKey()
public boolean isCombineArguments()
public void setArguments(Object[] arguments)
arguments
- the arguments to setpublic void setCombineArguments(boolean combineArguments)
combineArguments
- true to append the arguments, which were passed to toString, to the arguments set
with setArguments.public void setMessageKey(String messageKey)
messageKey
- the messageKey to setpublic String toString()
public String toString(Locale locale, Object... arguments)
LocalizedMessage
toString
in interface LocalizedMessage
locale
- The locale to be used.arguments
- Set this to overwrite possible default arguments.Copyright © 2019 Communote team. All rights reserved.