Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.util.i18n
Class MessageBundle

    java.lang.Object
      |
      +--com.beasys.util.i18n.MessageBundle

public class MessageBundle
extends java.lang.Object

MessageBundle provides methods which facilitate the internationalization of client objects through retrieval of locale-specific static text and constructed messages.

Constructor Summary
`protected` | `MessageBundle()`

Method Summary
`static MessageBundle` | `getInstance(java.lang.String baseName)` Retrieves an instance of a `MessageBundle`, provided a base name from which the bundle can be constructed.
`java.lang.String` | `getMessage(java.lang.Object[] args, java.lang.String key)` Constructs a message using the provided arguments and a key into the message bundle's properties table.
`java.lang.String` | `getString(java.lang.String key)` Retrieves a static text segment using a key into the message bundle's properties table.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageBundle

    protected MessageBundle()

Method Detail

### getInstance

    public static MessageBundle getInstance(java.lang.String baseName)

  Retrieves an instance of a `MessageBundle`, provided a base name from which the bundle can be constructed.
  Parameters:
    `baseName` - the class name used to retrieve the bundle. An example of a base name is "com.beasys.portal.jspbeans.i18n.GenPrefs", where a text file titled "GenPrefs.properties" exists in the "i18n" directory under the "com.beasys.portal.jspbeans" package.
  Returns:
    `MessageBundle` a constructed `MessagseBundle`

### getMessage

    public java.lang.String getMessage(java.lang.Object[] args,
                                       java.lang.String key)

  Constructs a message using the provided arguments and a key into the message bundle's properties table.
  Parameters:
    `args` - the arguments used to construct the message. For example, {"Wednesday", "78"};
    `key` - the key into the `MessageBundle` object's properties For example, "dayAndTemp.msg"
  Returns:
    `String` the resultant message For example, "Today is Wednesday, and the temperature is 78 degrees."

### getString

    public java.lang.String getString(java.lang.String key)

  Retrieves a static text segment using a key into the message bundle's properties table.
  Parameters:
    `key` - the key into the `MessageBundle` object's properties For example, "hello.txt"
  Returns:
    `String` the static text segment For example, "Hello."

Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 BEA Systems, Inc. All Rights Reserved