Class MessagesImpl
java.lang.Object
org.apache.tapestry5.commons.util.AbstractMessages
org.apache.tapestry5.commons.internal.util.MessagesImpl
- All Implemented Interfaces:
Messages
Implementation of
Messages based around a ResourceBundle.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MessagesFinds the messages for a given Messages utility class.getKeys()Returns a set of all the keys for which this instance may provide a value.protected StringvalueForKey(String key) Invoked to provide the value for a particular key.Methods inherited from class org.apache.tapestry5.commons.util.AbstractMessages
contains, format, get, getFormatter
-
Constructor Details
-
MessagesImpl
-
-
Method Details
-
forClass
Finds the messages for a given Messages utility class. Strings the trailing "Messages" and replaces it with "Strings" to form the base path. Loads the bundle using the default locale, and the class' class loader.- Parameters:
forClass-- Returns:
- Messages for the class
-
valueForKey
Description copied from class:AbstractMessagesInvoked to provide the value for a particular key. This may be invoked multiple times even for the same key. The implementation should ignore the case of the key.- Specified by:
valueForKeyin classAbstractMessages- Parameters:
key- the key to obtain a value for (case insensitive)- Returns:
- the value for the key, or null if this instance can not provide the value
-
getKeys
Description copied from interface:MessagesReturns a set of all the keys for which this instance may provide a value.- Returns:
- set of keys
-