|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.l2fprod.common.util.ResourceManager
public class ResourceManager
Manages application resources.
| Method Summary | |
|---|---|
static ResourceManager |
all(java.lang.Class clazz)
|
static ResourceManager |
common()
Gets the default ResourceManager. |
static ResourceManager |
get(java.lang.Class clazz)
Gets the ResourceManager associated with clazz. |
static ResourceManager |
get(java.lang.String bundleName)
Gets the ResourceManager with the given name. |
char |
getChar(java.lang.String key)
Gets the first character of the String associated with key. |
java.lang.String |
getString(java.lang.String key)
Gets the String associated with key after having
resolved any nested keys (resolve(String)). |
java.lang.String |
getString(java.lang.String key,
java.lang.Object[] args)
Gets the String associated with key after having
resolved any nested keys (resolve(String)) and applied
a formatter using the given args. |
static java.lang.String |
resolve(java.lang.String rbAndProperty)
Resolves any references to a resource bundle contained in rbAndProperty. |
static java.lang.String |
resolve(java.lang.String rbAndProperty,
java.lang.Object[] args)
Same as resolve(String) but once the value as been
resolved, a MessageFormatter is applied with the given
args. |
static ResourceManager |
ui()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ResourceManager get(java.lang.Class clazz)
clazz.
It looks for a ResourceBundle named against the class name plus
the string "RB". For example, for the com.mypackage.Main, the
ResourceBundle com.mypackage.MainRB will be looked up.
clazz -
public static ResourceManager get(java.lang.String bundleName)
bundleName -
public static ResourceManager all(java.lang.Class clazz)
clazz -
public static ResourceManager common()
all(ResourceManager.class). It returns the
ResourceManager named "AllRB" located in the same package
ResourceManager class (i.e com.l2fprod.common.util.AllRB).
public static ResourceManager ui()
public static java.lang.String resolve(java.lang.String rbAndProperty)
rbAndProperty. To reference a resource bundle
inside a property use ${com.package.FileRB:key},
this will look for key in the ResourceBundle
com.package.FileRB.
rbAndProperty -
public static java.lang.String resolve(java.lang.String rbAndProperty,
java.lang.Object[] args)
resolve(String) but once the value as been
resolved, a MessageFormatter is applied with the given
args.
rbAndProperty - args -
public java.lang.String getString(java.lang.String key)
key after having
resolved any nested keys (resolve(String)).
key - the key to lookup
key
public java.lang.String getString(java.lang.String key,
java.lang.Object[] args)
key after having
resolved any nested keys (resolve(String)) and applied
a formatter using the given args.
key - the key to lookupargs - the arguments to pass to the formatter
keypublic char getChar(java.lang.String key)
key.
key - the key to lookup
key.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||