public class Messages
extends java.lang.Object
Constructor and Description |
---|
Messages(Lang lang,
MessagesApi messages) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
at(java.util.List<java.lang.String> keys,
java.lang.Object... args)
Get the message at the first defined key.
|
java.lang.String |
at(java.lang.String key,
java.lang.Object... args)
Get the message at the given key.
|
static java.lang.String |
get(Lang lang,
java.util.List<java.lang.String> keys,
java.lang.Object... args)
Deprecated.
Please use messages.at(keys, args)
|
static java.lang.String |
get(Lang lang,
java.lang.String key,
java.lang.Object... args)
Deprecated.
Please use messages.at(key, args). since 2.5.0
|
static java.lang.String |
get(java.util.List<java.lang.String> keys,
java.lang.Object... args)
Deprecated.
use messages.at(keys, args). Deprecated since 2.5.0
|
static java.lang.String |
get(java.lang.String key,
java.lang.Object... args)
Deprecated.
use messages.at(key, args). Deprecated since 2.5.0
|
static java.lang.Boolean |
isDefined(Lang lang,
java.lang.String key)
Deprecated.
Use messages.isDefinedAt(key). Deprecated since 2.5.0
|
static java.lang.Boolean |
isDefined(java.lang.String key)
Deprecated.
Use messages.isDefinedAt(key). Deprecated since 2.5.0
|
java.lang.Boolean |
isDefinedAt(java.lang.String key)
Check if a message key is defined.
|
Lang |
lang()
The lang for these messages
|
MessagesApi |
messagesApi() |
public Messages(Lang lang, MessagesApi messages)
@Deprecated public static java.lang.String get(Lang lang, java.lang.String key, java.lang.Object... args)
lang
- the message langkey
- the message keyargs
- the message arguments@Deprecated public static java.lang.String get(Lang lang, java.util.List<java.lang.String> keys, java.lang.Object... args)
lang
- the message langkeys
- the messages keysargs
- the message arguments@Deprecated public static java.lang.String get(java.lang.String key, java.lang.Object... args)
key
- the message keyargs
- the message arguments@Deprecated public static java.lang.String get(java.util.List<java.lang.String> keys, java.lang.Object... args)
keys
- the messages keysargs
- the message arguments@Deprecated public static java.lang.Boolean isDefined(Lang lang, java.lang.String key)
lang
- the message langkey
- the message key@Deprecated public static java.lang.Boolean isDefined(java.lang.String key)
key
- the message keypublic Lang lang()
public MessagesApi messagesApi()
public java.lang.String at(java.lang.String key, java.lang.Object... args)
key
- the message keyargs
- the message argumentspublic java.lang.String at(java.util.List<java.lang.String> keys, java.lang.Object... args)
keys
- the messages keysargs
- the message argumentspublic java.lang.Boolean isDefinedAt(java.lang.String key)
key
- the message key