GWT 2.0.3

com.google.gwt.i18n.rebind
Class LocaleUtils

java.lang.Object
  extended by com.google.gwt.i18n.rebind.LocaleUtils

public class LocaleUtils
extends java.lang.Object

Utility methods for dealing with locales.


Method Summary
static void clear()
          Clear any static state associated with LocaleUtils.
 java.util.Set<GwtLocale> getAllCompileLocales()
          Returns the set of all compile-time locales.
 java.util.Set<GwtLocale> getAllLocales()
          Returns the set of all available locales, whether compile-time locales or runtime locales.
 GwtLocale getCompileLocale()
           
static LocaleUtils getInstance(TreeLogger logger, PropertyOracle propertyOracle)
          Create a new LocaleUtils instance for the given PropertyOracle.
static GwtLocaleFactory getLocaleFactory()
          Get a shared GwtLocale factory so instances are cached between all uses.
 java.util.Set<GwtLocale> getRuntimeLocales()
          Returns a list of locales which are children of the current compile-time locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public static void clear()
Clear any static state associated with LocaleUtils.


getInstance

public static LocaleUtils getInstance(TreeLogger logger,
                                      PropertyOracle propertyOracle)
Create a new LocaleUtils instance for the given PropertyOracle. Returned instances will be immutable and can be shared across threads.

Parameters:
logger -
propertyOracle -
Returns:
LocaleUtils instance

getLocaleFactory

public static GwtLocaleFactory getLocaleFactory()
Get a shared GwtLocale factory so instances are cached between all uses.

Returns:
singleton GwtLocaleFactory instance.

getAllCompileLocales

public java.util.Set<GwtLocale> getAllCompileLocales()
Returns the set of all compile-time locales.

Returns:
unmodifiable set of all compile-time locales

getAllLocales

public java.util.Set<GwtLocale> getAllLocales()
Returns the set of all available locales, whether compile-time locales or runtime locales.

Returns:
unmodifiable set of all locales

getCompileLocale

public GwtLocale getCompileLocale()
Returns:
the static compile-time locale for this permutation.

getRuntimeLocales

public java.util.Set<GwtLocale> getRuntimeLocales()
Returns a list of locales which are children of the current compile-time locale.

Returns:
unmodifiable list of matching locales

GWT 2.0.3