|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.propertiesfile.ResourceBundle
public class ResourceBundle
| Field Summary | |
|---|---|
protected java.util.Hashtable |
resources
|
| Constructor Summary | |
|---|---|
protected |
ResourceBundle(java.lang.String name,
java.util.Hashtable resources)
Constructs a new Resource bundle with Hashtable that stores localized resources. |
| Method Summary | |
|---|---|
static ResourceBundle |
getBundle(java.lang.String name,
java.lang.String locale,
Bundle loader)
Obtains instance of ResourceBundle identified by it's name, locale and loaded using bundle to load the file. |
static ResourceBundle |
getBundle(java.lang.String name,
java.lang.String locale,
Bundle loader,
PackageAdmin pkgAdmin)
This method is used to localize bundle manifest only. |
java.lang.String |
getLocale()
This method is used to retrieve the locale that is used when loading the bundle. |
static java.lang.String[] |
getLocales(java.lang.String name,
Bundle loader)
|
java.lang.Object |
getObject(java.lang.String key)
Returns a localized object |
static void |
removeFromCache(Bundle loader)
|
static void |
removeFromCache(java.lang.String name,
java.lang.String locale,
Bundle loader)
|
protected void |
setLocale(java.lang.String locale)
Sets the locale of the bundle |
protected void |
setParent(ResourceBundle parent)
Sets the parent ResourceBundle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Hashtable resources
| Constructor Detail |
|---|
protected ResourceBundle(java.lang.String name,
java.util.Hashtable resources)
name - the name of the properties fileresources - localized resources| Method Detail |
|---|
public java.lang.String getLocale()
public java.lang.Object getObject(java.lang.String key)
throws java.util.MissingResourceException
key - the key of the object
String.
java.util.MissingResourceException - if there is no such key.protected void setLocale(java.lang.String locale)
locale - the localeprotected void setParent(ResourceBundle parent)
parent - a resource bundle
public static ResourceBundle getBundle(java.lang.String name,
java.lang.String locale,
Bundle loader)
The resource bundle will first check if name is class
name. If there is such class it is instantiated and returned as result.
That class *must* extend this ResourceBundle.
If no class resource bundle is found it will look for an property file
and load it. The properties specified in this file are used as i18n
resources. This kind of resource bundles always return
String object by their getObject() method.
The Bundle-Classpath is used to search the property file. The methd
Bundle.getResource() is used.
name - the name of resource bundlelocale - desired localeloader - the bundle, that is used to read the properties from
public static ResourceBundle getBundle(java.lang.String name,
java.lang.String locale,
Bundle loader,
PackageAdmin pkgAdmin)
public static java.lang.String[] getLocales(java.lang.String name,
Bundle loader)
public static void removeFromCache(java.lang.String name,
java.lang.String locale,
Bundle loader)
public static void removeFromCache(Bundle loader)
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||