public final class BasicLocalizedMessage extends Object implements LocalizedMessage
LocalizedMessage that resolves a single message key.
See LocalizedMessageResolver.resolveMessage(Locale, String) for more details.
| Constructor and Description |
|---|
BasicLocalizedMessage(String key)
Constructs a new
BasicLocalizedMessage from a localized message key. |
| Modifier and Type | Method and Description |
|---|---|
String |
resolve(Locale locale,
LocalizedMessageResolver resolver)
Resolves this message for a specific
Locale. |
String |
toString() |
public BasicLocalizedMessage(String key)
BasicLocalizedMessage from a localized message key.key - the key (property) used to resolve the message in the localization bundlepublic String resolve(Locale locale, LocalizedMessageResolver resolver)
LocalizedMessageLocale.
This method does not guarantee that the returned value will be customized for the specified locale, but ensures that a best-effort attempt is made to do so.
resolve in interface LocalizedMessagelocale - the target language/region to localize the message forresolver - used to lookup localized messages by keyCopyright 2023 Ping Identity Corp. All rights reserved.