|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ioc.util.AbstractMessages
public abstract class AbstractMessages
Abstract implementation of Messages
that doesn't know where values come from (that information is supplied in
a subclass, via the valueForKey(String)
method).
Constructor Summary | |
---|---|
protected |
AbstractMessages(Locale locale)
|
Method Summary | |
---|---|
boolean |
contains(String key)
Returns true if the bundle contains the named key. |
String |
format(String key,
Object... args)
Convienience for accessing a formatter and formatting a localized message with arguments. |
String |
get(String key)
Returns the localized message for the given key. |
MessageFormatter |
getFormatter(String key)
Returns a formatter for the message, which can be used to substitute arguments (as per Formatter ). |
protected abstract String |
valueForKey(String key)
Invoked to provide the value for a particular key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractMessages(Locale locale)
Method Detail |
---|
protected abstract String valueForKey(String key)
key
- the key to obtain a value for (case insensitive)
public boolean contains(String key)
Messages
contains
in interface Messages
public String get(String key)
Messages
get
in interface Messages
public MessageFormatter getFormatter(String key)
Messages
Formatter
).
getFormatter
in interface Messages
public String format(String key, Object... args)
Messages
format
in interface Messages
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |