|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjimm.twice.ice.Codes
This class finds the ICE error code short phrase for a particular error code number. It also contains a method for changing the locale (language).
Each language should have a file called codes_XX_YY.properties, where XX is the language code (e.g., "en" for English, "fr" for French) and YY is the country code (e.g., "US", "FR").
| Field Summary | |
protected java.util.ResourceBundle |
codes
|
protected java.util.Locale |
locale
|
protected static java.lang.String |
RESOURCE_FILE_PREFIX
|
| Constructor Summary | |
protected |
Codes()
Cosntructor. |
| Method Summary | |
java.util.Locale |
getLocale()
Returns the current locale. |
static Codes |
instance()
Returns the single instance of Codes. |
java.lang.String |
phraseFor(int code)
Returns the string corresponding to the specified error code number, or null if there isn't one. |
void |
setLocale(java.util.Locale locale)
Given a locale, start using the code short phrases for that lanuage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String RESOURCE_FILE_PREFIX
protected java.util.Locale locale
protected java.util.ResourceBundle codes
| Constructor Detail |
protected Codes()
| Method Detail |
public static Codes instance()
Codes.
Codespublic void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public java.lang.String phraseFor(int code)
null if there isn't one.
null if there isn't one
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||