public class Resources
extends java.lang.Object
{@<property>} syntax.
The referenced property must either be located in the same file (the order of the properties in the file is not important) or must already be loaded.
Example:
actions.openDocument.chooseFileDialog.title = {@actions.openDocument.title} actions.openDocument.menu.title = _{@actions.openDocument.title}... actions.openDocument.title = Open document
| Modifier and Type | Method | Description |
|---|---|---|
static void |
clearResources() |
Clears the resources for the default locale.
|
static void |
clearResources(java.util.Locale locale) |
Clears the resources for the given locale.
|
static java.lang.String |
getQuantityString(java.lang.String key,
int quantity,
java.lang.Object... args) |
Returns the string resource with the given key for the default locale.
|
static java.lang.String |
getQuantityString(java.util.Locale locale,
java.lang.String key,
int quantity,
java.lang.Object... args) |
Returns the string resource with the given key for the given locale.
|
static java.lang.String |
getString(java.lang.String key,
java.lang.Object... args) |
Returns the string resource with the given key for the default locale.
|
static java.lang.String |
getString(java.util.Locale locale,
java.lang.String key,
java.lang.Object... args) |
Returns the string resource with the given key for the given locale.
|
static void |
loadResources(java.lang.String baseName) |
Loads resources from the given resource bundle.
|
static void |
loadResources(java.lang.String baseName,
java.util.Locale locale) |
Loads resources from the given resource bundle.
|
static void |
loadResources(java.lang.String baseName,
java.util.Locale locale,
java.lang.ClassLoader classLoader) |
Loads resources from the given resource bundle.
|
public static void clearResources()
public static void clearResources(java.util.Locale locale)
java.lang.IllegalArgumentException - if locale is nullpublic static java.lang.String getQuantityString(java.lang.String key,
int quantity,
java.lang.Object... args)
MessageFormat.format(String, Object...) into the resource.java.lang.IllegalArgumentException - if key is null or emptypublic static java.lang.String getQuantityString(java.util.Locale locale,
java.lang.String key,
int quantity,
java.lang.Object... args)
MessageFormat.format(String, Object...) into the resource.java.lang.IllegalArgumentException - if locale is nulljava.lang.IllegalArgumentException - if key is null or emptypublic static java.lang.String getString(java.util.Locale locale,
java.lang.String key,
java.lang.Object... args)
MessageFormat.format(String, Object...) into the resource.java.lang.IllegalArgumentException - if locale is nulljava.lang.IllegalArgumentException - if key is null or emptypublic static java.lang.String getString(java.lang.String key,
java.lang.Object... args)
MessageFormat.format(String, Object...) into the resource.java.lang.IllegalArgumentException - if key is null or emptypublic static void loadResources(java.lang.String baseName)
java.lang.IllegalArgumentException - if baseName is null or emptyResourceBundle.getBundle(String)public static void loadResources(java.lang.String baseName,
java.util.Locale locale)
java.lang.IllegalArgumentException - if baseName is null or emptyjava.lang.IllegalArgumentException - if locale is nullResourceBundle.getBundle(String, Locale)public static void loadResources(java.lang.String baseName,
java.util.Locale locale,
java.lang.ClassLoader classLoader)
java.lang.IllegalArgumentException - if baseName is null or emptyjava.lang.IllegalArgumentException - if locale is nulljava.lang.IllegalArgumentException - if classLoader is nullResourceBundle.getBundle(String, Locale, ClassLoader)