Package org.gwtproject.i18n.client
Interface ConstantsWithLookup
- All Superinterfaces:
Constants,Localizable,LocalizableResource
public interface ConstantsWithLookup extends Constants
Like
Constants, a tag interface that facilitates
locale-sensitive, compile-time binding of constant values supplied from properties files with the
added ability to look up constants at runtime with a string key.
ConstantsWithLookup extends Constants and is
identical in behavior, adding only a family of special-purpose lookup methods such as getString(String).
It is generally preferable to extend Constants rather than
ConstantsWithLookup because ConstantsWithLookup forces all constants to be
retained in the compiled script, preventing the GWT compiler from pruning unused constant
accessors.
Required Module
Modules that use this interface should inheritcom.google.gwt.i18n.I18N.
Note
You should not directly implement this interface or interfaces derived from it since an implementation is generated automatically when message interfaces are created using.- See Also:
Constants
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gwtproject.i18n.client.Constants
Constants.DefaultBooleanValue, Constants.DefaultDoubleValue, Constants.DefaultFloatValue, Constants.DefaultIntValue, Constants.DefaultStringArrayValue, Constants.DefaultStringMapValue, Constants.DefaultStringValueNested classes/interfaces inherited from interface org.gwtproject.i18n.shared.Localizable
Localizable.I18nLocaleSuffuxes, Localizable.IsLocalizableNested classes/interfaces inherited from interface org.gwtproject.i18n.client.LocalizableResource
LocalizableResource.DefaultLocale, LocalizableResource.Description, LocalizableResource.Generate, LocalizableResource.GeneratedFrom, LocalizableResource.GenerateKeys, LocalizableResource.Key, LocalizableResource.Meaning -
Method Summary
Modifier and Type Method Description booleangetBoolean(java.lang.String methodName)Look upbooleanby method name.doublegetDouble(java.lang.String methodName)Look updoubleby method name.floatgetFloat(java.lang.String methodName)Look upfloatby method name.intgetInt(java.lang.String methodName)Look upintby method name.java.util.Map<java.lang.String,java.lang.String>getMap(java.lang.String methodName)Look upMapby method name.java.lang.StringgetString(java.lang.String methodName)Look upStringby method name.java.lang.String[]getStringArray(java.lang.String methodName)Look upString[]by method name.
-
Method Details
-
getBoolean
boolean getBoolean(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upbooleanby method name.- Parameters:
methodName- method name- Returns:
- boolean returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getDouble
double getDouble(java.lang.String methodName) throws java.util.MissingResourceExceptionLook updoubleby method name.- Parameters:
methodName- method name- Returns:
- double returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getFloat
float getFloat(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upfloatby method name.- Parameters:
methodName- method name- Returns:
- float returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getInt
int getInt(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upintby method name.- Parameters:
methodName- method name- Returns:
- int returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getMap
java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upMapby method name.- Parameters:
methodName- method name- Returns:
- Map returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getString
java.lang.String getString(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upStringby method name.- Parameters:
methodName- method name- Returns:
- String returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-
getStringArray
java.lang.String[] getStringArray(java.lang.String methodName) throws java.util.MissingResourceExceptionLook upString[]by method name.- Parameters:
methodName- method name- Returns:
- String[] returned by method
- Throws:
java.util.MissingResourceException- if methodName is not valid
-