LibreOffice Module xmerge (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.openoffice.xmerge.util.Resources Class Reference

Provides a singleton resource class for converter messages. More...

Collaboration diagram for org.openoffice.xmerge.util.Resources:
[legend]

Public Member Functions

String getString (String key)
 This method returns the corresponding String given the key. More...
 

Static Public Member Functions

static synchronized Resources getInstance ()
 This method returns the singleton instance of this class. More...
 

Private Member Functions

 Resources ()
 Default constructor is only accessible within this class. More...
 

Private Attributes

final ResourceBundle rb
 

Static Private Attributes

static Resources instance = null
 

Detailed Description

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.

Definition at line 37 of file Resources.java.

Constructor & Destructor Documentation

◆ Resources()

org.openoffice.xmerge.util.Resources.Resources ( )
inlineprivate

Default constructor is only accessible within this class.

Load the resource bundle that contains the resource String values.

Definition at line 61 of file Resources.java.

References org.openoffice.xmerge.util.Resources.rb.

Referenced by org.openoffice.xmerge.util.Resources.getInstance().

Member Function Documentation

◆ getInstance()

static synchronized Resources org.openoffice.xmerge.util.Resources.getInstance ( )
inlinestatic

This method returns the singleton instance of this class.

Returns
The singleton Resources instance.

Definition at line 47 of file Resources.java.

References org.openoffice.xmerge.util.Resources.instance, and org.openoffice.xmerge.util.Resources.Resources().

Referenced by org.openoffice.xmerge.converter.xml.OfficeDocumentException.constructMessage(), and org.openoffice.xmerge.merger.diff.NodeIterator.equivalent().

◆ getString()

String org.openoffice.xmerge.util.Resources.getString ( String  key)
inline

This method returns the corresponding String given the key.

Parameters
keyKey string for getting the message String.
Returns
Message String corresponding to the key.

Definition at line 71 of file Resources.java.

References org.openoffice.xmerge.util.Resources.rb, and String.

Referenced by org.openoffice.xmerge.converter.xml.OfficeDocumentException.constructMessage(), and org.openoffice.xmerge.merger.diff.NodeIterator.equivalent().

Member Data Documentation

◆ instance

Resources org.openoffice.xmerge.util.Resources.instance = null
staticprivate

Definition at line 40 of file Resources.java.

Referenced by org.openoffice.xmerge.util.Resources.getInstance().

◆ rb

final ResourceBundle org.openoffice.xmerge.util.Resources.rb
private

The documentation for this class was generated from the following file: