public class MessageResources extends Object
MessageUtil を利用して、メッセージを取得する。| 修飾子とタイプ | メソッドと説明 |
|---|---|
String |
getMessage(Locale locale,
String messageId)
Returns a text message for the specified key, for the default Locale.
|
String |
getMessage(Locale locale,
String messageId,
Object... args)
Returns a text message after parametric replacement of the specified
parameter placeholders.
|
String |
getMessage(String messageId)
Returns a text message for the specified messageId
|
String |
getMessage(String messageId,
Object... path)
Returns a text message after parametric replacement of the specified
parameter placeholders.
|
String |
getMessage(String messageId,
Object path,
String name)
Returns a text message after parametric replacement of the specified
parameter placeholders.
|
static MessageResources |
getMessageResources(String string)
Create and return an instance of
MessageResources. |
public static MessageResources getMessageResources(String string)
MessageResources.string - Strutsではメッセージファイルの場所を表す文字列が入るがNablarchでは使用しない。public String getMessage(String messageId, Object path, String name)
messageId - The message messageId to look uppath - The replacement for placeholder in the messagename - The replacement for placeholder in the messagepublic String getMessage(String messageId, Object... path)
messageId - The message messageId to look uppath - The replacement for placeholder in the messagepublic String getMessage(String messageId)
messageId - The message messageId to look uppublic String getMessage(Locale locale, String messageId, Object... args)
locale - The requested message Locale, or null for
the system default LocalemessageId - The message messageId to look upargs - The replacement for placeholder in the message