OpenOffice.org
XMerge API

org.openoffice.xmerge.util
Class Resources

java.lang.Object
  |
  +--org.openoffice.xmerge.util.Resources

public final class Resources
extends java.lang.Object

Provides a singleton resource class for converter messages.

By default, this class will search for a ResourceBundle class file or properties file based on the default locale.

A properties file resources.properties will be provided.

Note that if the resource bundle object is not loaded, the construction of the singleton object will throw a MissingResourceException, which is a RuntimeException, thus I opted to not explicitly declare it. If it does throw MissingResourceException, it may be due to a packaging problem.


Method Summary
static Resources getInstance()
          This method returns the singleton instance of this class.
 java.lang.String getString(java.lang.String key)
          This method returns the corresponding String given the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Resources getInstance()
This method returns the singleton instance of this class.
Returns:
The singleton Resources instance.

getString

public java.lang.String getString(java.lang.String key)
This method returns the corresponding String given the key.
Parameters:
key - Key string for getting the message String.
Returns:
Message String corresponding to the key.

OpenOffice.org
XMerge API

Copyright © 2002 OpenOffice.org