public interface

ConstantsWithLookup

implements Constants
com.google.gwt.i18n.client.ConstantsWithLookup

Class Overview

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 inherit com.google.gwt.i18n.I18N. {@gwt.include com/google/gwt/examples/i18n/InheritsExample.gwt.xml}

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 create(Class).

See Also

Summary

Public Methods
abstract boolean getBoolean(String methodName)
Look up boolean by method name.
abstract double getDouble(String methodName)
Look up double by method name.
abstract float getFloat(String methodName)
Look up float by method name.
abstract int getInt(String methodName)
Look up int by method name.
abstract Map<StringString> getMap(String methodName)
Look up Map by method name.
abstract String getString(String methodName)
Look up String by method name.
abstract String[] getStringArray(String methodName)
Look up String[] by method name.

Public Methods

public abstract boolean getBoolean (String methodName)

Look up boolean by method name.

Parameters
methodName method name
Returns
  • boolean returned by method
Throws
MissingResourceException if methodName is not valid

public abstract double getDouble (String methodName)

Look up double by method name.

Parameters
methodName method name
Returns
  • double returned by method
Throws
MissingResourceException if methodName is not valid

public abstract float getFloat (String methodName)

Look up float by method name.

Parameters
methodName method name
Returns
  • float returned by method
Throws
MissingResourceException if methodName is not valid

public abstract int getInt (String methodName)

Look up int by method name.

Parameters
methodName method name
Returns
  • int returned by method
Throws
MissingResourceException if methodName is not valid

public abstract Map<StringString> getMap (String methodName)

Look up Map by method name.

Parameters
methodName method name
Returns
  • Map returned by method
Throws
MissingResourceException if methodName is not valid

public abstract String getString (String methodName)

Look up String by method name.

Parameters
methodName method name
Returns
  • String returned by method
Throws
MissingResourceException if methodName is not valid

public abstract String[] getStringArray (String methodName)

Look up String[] by method name.

Parameters
methodName method name
Returns
  • String[] returned by method
Throws
MissingResourceException if methodName is not valid