java.lang.Object | |
↳ | com.google.gwt.i18n.rebind.AbstractResource |
Known Direct Subclasses |
AbstractResource serves the same purpose as java ResourceBundle/PropertyResourceBundle.
Each Resource
belongs to a resource tree, indicated by the
path attribute.
AbstractResource uses a Factory pattern rather than a single static method to load itself given an abstract string path.
One advanced feature which should not be used outside the core GWT system is that resources can have more than one parent, for instance pets_en_US could have pets_en as one parent and animals_en_US as another. The alternative parents have lower precedence than any primary parent. Each alternative parent is associated with a separate resource tree.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractResource.MissingResourceException | Exception indicating a required resource was not found. | ||||||||||
AbstractResource.MultipleFormEntry | Implementation of ResourceEntry that supports multiple forms per entry. | ||||||||||
AbstractResource.ResourceEntry | Definition of a single entry for a resource. | ||||||||||
AbstractResource.ResourceList | Encapsulates an ordered set of resources to search for translations. | ||||||||||
AbstractResource.SimpleEntry | A simple resource entry with no alternate forms, only a key and a value. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | REPORT_KEYS_THRESHOLD | Error messages concerning missing keys should include the defined keys if the number of keys is below this threshold. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
matchLocale |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an entry in this resource.
| |||||||||||
Get a string and fail if not present.
| |||||||||||
Get a string (with optional extension) and fail if not present.
| |||||||||||
Get a key.
| |||||||||||
Get a key with an extension.
| |||||||||||
Keys associated with this resource.
| |||||||||||
Returns true if this resource has any keys.
| |||||||||||
A multi-line representation of this object.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Error messages concerning missing keys should include the defined keys if the number of keys is below this threshold.
Returns an entry in this resource.
Get a string and fail if not present.
Get a string (with optional extension) and fail if not present.
Get a key.
key | key to lookup |
---|
Get a key with an extension. Identical to getString() if extension is null.
key | to lookup |
---|---|
extension | extension of the key, nullable |
Returns true if this resource has any keys.