Package eu.webtoolkit.jwt
Class WLocalizedStrings
java.lang.Object
eu.webtoolkit.jwt.WLocalizedStrings
- Direct Known Subclasses:
WCombinedLocalizedStrings
,WStdLocalizedStrings
,WXmlLocalizedStrings
public abstract class WLocalizedStrings
extends java.lang.Object
An abstract class that provides support for localized strings.
This abstract class provides the content to localized WStrings, by resolving the key to a string using the current application locale.
-
Constructor Summary
Constructors Constructor Description WLocalizedStrings()
-
Method Summary
Modifier and Type Method Description void
hibernate()
Purges memory resources, if possible.void
refresh()
Rereads the message resources.abstract java.lang.String
resolveKey(java.lang.String key)
Resolves a key in the current locale.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WLocalizedStrings
public WLocalizedStrings()
-
-
Method Details
-
refresh
public void refresh()Rereads the message resources.Purge any cached key/values, if applicable.
The default implementation does nothing.
-
hibernate
public void hibernate()Purges memory resources, if possible.This is called afer event handling, and is an opportunity to conserve memory inbetween events, by freeing memory used for cached key/value bindings, if applicable.
The default implementation does nothing.
-
resolveKey
public abstract java.lang.String resolveKey(java.lang.String key)Resolves a key in the current locale.This method is used by
WString
to obtain the UTF8 value corresponding to a key in the current locale.Returns the value if the key could be resolved. Returns
null
otherwise.- See Also:
WApplication.getLocale()
,WString.tr(String key)
-