public class DelegatingMessagesImpl extends Object implements Messages
Messages
that wraps two other Messages instances: a primary and a delegate.
The primary handles any keys it contains; method invocations that reference keys not contained by
the primary are passed on to the delegate.Constructor and Description |
---|
DelegatingMessagesImpl(Messages primary,
Messages delegate) |
Modifier and Type | Method and Description |
---|---|
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 ). |
public DelegatingMessagesImpl(Messages primary, Messages delegate)
public boolean contains(String key)
Messages
public String format(String key, Object... args)
Messages
public String get(String key)
Messages
public MessageFormatter getFormatter(String key)
Messages
Formatter
).getFormatter
in interface Messages
Copyright © 2003-2012 The Apache Software Foundation.