public interface MessageResolver
MessageSourceAccessor
to allow more direct replacement with a no-op implementation in
case the target MessageSource
is unavailable to avoid resolution overhead.Modifier and Type | Field and Description |
---|---|
static MessageResolver |
DEFAULTS_ONLY |
Modifier and Type | Method and Description |
---|---|
static MessageResolver |
of(MessageSource messageSource)
Obtains a
MessageResolver for the given MessageSource . |
String |
resolve(MessageSourceResolvable resolvable)
Resolve the given
MessageSourceResolvable . |
static final MessageResolver DEFAULTS_ONLY
@Nullable String resolve(MessageSourceResolvable resolvable)
MessageSourceResolvable
. Return null if no message was found.resolvable
- must not be null.static MessageResolver of(@Nullable MessageSource messageSource)
MessageResolver
for the given MessageSource
.messageSource
- can be null.Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.