Class Messages

java.lang.Object
com.sun.tools.corba.se.idl.som.cff.Messages

public abstract class Messages extends Object
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.

Author:
Larry K. Raper
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final String
    msg(String msgkey)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, int parm)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, int parm1, int parm2)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, int parm1, String parm2)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, String parm)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, String parm1, int parm2)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, String parm1, String parm2)
    Returns the message text corresponding to the passed msgkey string.
    static final String
    msg(String msgkey, String parm1, String parm2, String parm3)
    Returns the message text corresponding to the passed msgkey string.
    static final void
    msgLoad(String propertyFileName)
    Loads additional message keys and text found in the passed properties file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Messages

      public Messages()
  • Method Details

    • msgLoad

      public static final void msgLoad(String propertyFileName) throws IOException
      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.
      Throws:
      IOException
    • msg

      public static final String msg(String msgkey)
      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.
    • msg

      public static final String msg(String msgkey, String parm)
      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

      public static final String msg(String msgkey, int parm)
      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

      public static final String msg(String msgkey, String parm1, String parm2)
      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

      public static final String msg(String msgkey, int parm1, String parm2)
      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

      public static final String msg(String msgkey, String parm1, int parm2)
      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

      public static final String msg(String msgkey, int parm1, int parm2)
      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

      public static final String msg(String msgkey, String parm1, String parm2, String parm3)
      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.