@FunctionalInterface public interface MessageSourceResolvable
MessageSource
.
Spring's own validation error classes implement this interface.
MessageSource.getMessage(MessageSourceResolvable, java.util.Locale)
,
ObjectError
,
FieldError
Modifier and Type | Method and Description |
---|---|
default Object[] |
getArguments()
Return the array of arguments to be used to resolve this message.
|
String[] |
getCodes()
Return the codes to be used to resolve this message, in the order that
they should get tried.
|
default String |
getDefaultMessage()
Return the default message to be used to resolve this message.
|
@Nullable String[] getCodes()
@Nullable default Object[] getArguments()
The default implementation simply returns null
.
MessageFormat
@Nullable default String getDefaultMessage()
The default implementation simply returns null
.
Note that the default message may be identical to the primary
message code (getCodes()
), which effectively enforces
AbstractMessageSource.setUseCodeAsDefaultMessage(boolean)
for this particular message.
null
if no default