platypus
Class Literals
java.lang.Object
platypus.Literals
public class Literals
- extends java.lang.Object
Handles getting literal strings from resource bundle. The default resource bundle, called
Platypus.properties, must be present or the program aborts. It is in US English. If another
language is used, please see documentation to access the appropriate resource bundle.
- Author:
- alb
|
Constructor Summary |
private |
Literals(java.lang.String resourceName)
Open a resource bundle with the name: resourceName.properties
In the event the resource bundle cannot be found, the program
shuts down. |
|
Method Summary |
static Literals |
getInstance()
|
java.lang.String |
getLit(java.lang.String key)
Looks up a literal in the resource bundle. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thisInstance
private static final Literals thisInstance
lits
private java.util.ResourceBundle lits
Literals
private Literals(java.lang.String resourceName)
- Open a resource bundle with the name: resourceName.properties
In the event the resource bundle cannot be found, the program
shuts down. Clearly, this is a fatal error.
*
- Parameters:
resourceName - name of the resource bundle
getInstance
public static Literals getInstance()
getLit
public java.lang.String getLit(java.lang.String key)
- Looks up a literal in the resource bundle. In the event of error,
it returns a string consisting of one blank. In this manner, the
program will continue to work if someone has diddled with the resource
file, but it will have one (or more) blank literals.
- Parameters:
key - the name of the literal to be looked up
- Returns:
- the literal String that was searched for
Copyright © 2006-7 Pacific Data Works LLC