|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.i18n.Message
public final class Message
A user interface message consisting of a message key with optional arguments.
Typically, messages will be presented to the user by looking up their value in a properties file (or "bundle"), and applyingMessageFormat
to the value with any optional arguments. However, this class
does not stipulate how the values held by this object might be used.
This class is immutable and thread-safe.
Method Summary | |
---|---|
java.lang.Object[] |
getArguments()
Returns the arguments to the message. |
static Message |
getInstance(java.lang.String key)
Constructs and returns an instance of a message with the given key and no arguments. |
static Message |
getInstance(java.lang.String key,
java.util.List arguments)
Constructs and returns an instance of a message with the given key and arguments. |
static Message |
getInstance(java.lang.String key,
java.lang.Object... arguments)
Constructs and returns an instance of a message with the given key and arguments. |
java.lang.String |
getKey()
Returns the message key, used for looking up the message in a localisation bundle. |
boolean |
hasArguments()
Returns true if the message has arguments defined, otherwise false. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static Message getInstance(java.lang.String key)
key
- the i18n message key
public static Message getInstance(java.lang.String key, java.lang.Object... arguments)
key
- the i18n message keyarguments
- the arguments which will be interpolated in the message value, like with MessageFormat
public static Message getInstance(java.lang.String key, java.util.List arguments)
key
- the i18n message keyarguments
- the arguments which will be interpolated in the message value, like with MessageFormat
public java.lang.String getKey()
public java.lang.Object[] getArguments()
public boolean hasArguments()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |