public class NlsMessageLookupProxy extends Object implements NlsMessageLookup
NlsMessageLookup
to a single instance. It will call the delegate
instances in the given order and return the first result that is not null
.Modifier and Type | Field and Description |
---|---|
private NlsMessageLookup[] |
delegates |
Constructor and Description |
---|
NlsMessageLookupProxy(Class<? extends NlsBundleWithLookup>... bundles)
The constructor.
|
NlsMessageLookupProxy(NlsMessageLookup... delegates)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
NlsMessage |
getMessage(String key,
Map<String,Object> nlsArguments)
|
private final NlsMessageLookup[] delegates
getMessage(String, Map)
public NlsMessageLookupProxy(NlsMessageLookup... delegates)
delegates
- are the instances of NlsMessageLookup
to delegate to. Typically instances of
NlsBundleWithLookup
.@SafeVarargs public NlsMessageLookupProxy(Class<? extends NlsBundleWithLookup>... bundles)
bundles
- are the NlsBundleWithLookup
to delegate to.public NlsMessage getMessage(String key, Map<String,Object> nlsArguments)
NlsMessageLookup
getMessage
in interface NlsMessageLookup
key
- is the method name
.nlsArguments
- are the arguments
. May be null
for no arguments.NlsMessage
or null
if no message exists for the given methodName
(no such
method exists).Copyright © 2001–2016 mmm-Team. All rights reserved.