Package com.adobe.fd.assembler.client
Class MsgUtil
- java.lang.Object
-
- com.adobe.fd.assembler.client.MsgUtil
-
public final class MsgUtil extends java.lang.Object
A utility class to construct log-style message Strings. This uses java.text.MessageFormat, so it is not particularly fast, but that's ok since its mostly used for Exception construction anyway.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
generateMessage(java.lang.String original, int idx)
Generic method to extract the required part of text from the original stringstatic java.lang.String
getMsg(java.lang.String code)
Format a Msg0 into a String.static java.lang.String
getMsg(java.lang.String code, java.lang.Object arg0)
Format a Msg1 into a String.static java.lang.String
getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1)
Format a Msg2 into a String.static java.lang.String
getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
Format a Msg3 into a String.static java.lang.String
getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
Format a Msg4 into a String.
-
-
-
Method Detail
-
getMsg
public static java.lang.String getMsg(java.lang.String code)
Format a Msg0 into a String.- Parameters:
msg
- the Msg object to be formatted- Returns:
- the assembled String
-
getMsg
public static java.lang.String getMsg(java.lang.String code, java.lang.Object arg0)
Format a Msg1 into a String.- Parameters:
msg
- the Msg object to be formattedarg0
- the first message argument- Returns:
- the assembled String
-
getMsg
public static java.lang.String getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1)
Format a Msg2 into a String.- Parameters:
msg
- the Msg object to be formattedarg0
- the first message argumentarg1
- the second message argument- Returns:
- the assembled String
-
getMsg
public static java.lang.String getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
Format a Msg3 into a String.- Parameters:
msg
- the Msg object to be formattedarg0
- the first message argumentarg1
- the second message argumentarg2
- the third message argument- Returns:
- the assembled String
-
getMsg
public static java.lang.String getMsg(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
Format a Msg4 into a String.- Parameters:
msg
- the Msg object to be formattedarg0
- the first message argumentarg1
- the second message argumentarg2
- the third message argumentarg3
- the fourth message argument- Returns:
- the assembled String
-
generateMessage
public static java.lang.String generateMessage(java.lang.String original, int idx)
Generic method to extract the required part of text from the original string- Parameters:
original
- the original msg to be looked uponidx
- index at which we want to fetch info- Returns:
- the desired text
-
-