* Creates the message for the current state.
* @return message for the current state
*/
public Message getToMessage()
{
Message message = this.messageContext.message().text(this.messageKey).create();
for(Serializable argument : this.numberedArgument)
{
message.addArgument(argument);
}
for(Map.Entry<String, Serializable> entry : this.namedArgument.entrySet())
{
message.addArgument(new SimpleNamedArgument(entry.getKey(), entry.getValue()));
}
return message;
}