Class Messages
java.lang.Object
com.sun.tools.corba.ee.idl.som.cff.Messages
This class provides messaging services for accessing, and merging
parameters into, translatable message text. The text is presumed
to reside in a .properties file. A "cff.properties" file that
contains all of the message text needed for the CFF framework itself
is loaded during class initialization. All of the messages in the
cff.properties file that are needed by the CFF framework contain keys
that begin with the string "cff.".
The static method Messages.msgLoad may be used to merge additional message text .properties files needed by other frameworks or user programs.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static boolean
private static final String
private static final Properties
private static final char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final void
This method was introduced to fix defect #26964.private static final void
static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final String
Returns the message text corresponding to the passed msgkey string.static final void
Loads additional message keys and text found in the passed properties file.private static String
substituteString
(String orig, int paramNum, String subst)
-
Field Details
-
LTB
- See Also:
-
NL
private static final char NL- See Also:
-
lineSeparator
-
m
-
loadNeeded
private static boolean loadNeeded
-
-
Constructor Details
-
Messages
public Messages()
-
-
Method Details
-
loadDefaultProperties
private static final void loadDefaultProperties() -
fixMessages
This method was introduced to fix defect #26964. For Java 1.0.2 on Win NT, the escape sequence was not being handled correctly by the Java Properties class when it was the final character of a line. Instead the trailing blank was dropped and the next line was swallowed as a continuation. To work around the problem, we introduced our own metasymbol to represent a trailing blank. Hence: Performs substitution for any metasymbols in the message templates. So far only %B is needed. This was introduced to make it more convenient for .properties files to contain message templates with leading or trailing blanks (although %B may actually occur anywhere in a template). Subsequently, checking for '\n' has also been added. Now, wherever '\n' occurs in a message template, it is replaced with the value of System.getProperty ("line.separator"). -
msgLoad
Loads additional message keys and text found in the passed properties file. The specified properties file is assumed to reside in the CLASSPATH. An IOException is thrown if the loading fails.- Parameters:
propertyFileName
- file name of properties file to load- Throws:
IOException
-
msg
Returns the message text corresponding to the passed msgkey string. If the msgkey cannot be found, its value is returned as the output message text.- Parameters:
msgkey
- key of the message- Returns:
- resulting message text
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of a single argument, supplied by the "parm" parameter. If the message text does not contain the meta characters "%1" that indicate where to place the argument, the passed argument is appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
- Parameters:
msgkey
- message keyparm
- parameter for the message- Returns:
- resulting message text
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of a single argument, supplied by the "parm" parameter. If the message text does not contain the meta characters "%1" that indicate where to place the argument, the passed argument is appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of two arguments, supplied by the "parm1" and "parm2" parameters. If the message text does not contain the meta characters "%1" and "%2" that indicate where to place the arguments, the passed arguments are appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of two arguments, supplied by the "parm1" and "parm2" parameters. If the message text does not contain the meta characters "%1" and "%2" that indicate where to place the arguments, the passed arguments are appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of two arguments, supplied by the "parm1" and "parm2" parameters. If the message text does not contain the meta characters "%1" and "%2" that indicate where to place the arguments, the passed arguments are appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of two arguments, supplied by the "parm1" and "parm2" parameters. If the message text does not contain the meta characters "%1" and "%2" that indicate where to place the arguments, the passed arguments are appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
msg
Returns the message text corresponding to the passed msgkey string. The message text is assumed to require the insertion of three arguments, supplied by the "parm1", "parm2" and "parm3" parameters. If the message text does not contain the meta characters "%1" and "%2" that indicate where to place the arguments, the passed arguments are appended at the end of the message text.If the msgkey cannot be found, its value is used as the message text.
-
substituteString
-