Validate.notNull(messageKey, "Message key cannot be null");
final Set<IMessageResolver> messageResolvers =
arguments.getConfiguration().getMessageResolvers();
MessageResolution messageResolution = null;
for (final IMessageResolver messageResolver : messageResolvers) {
if (messageResolution == null) {
messageResolution =
messageResolver.resolveMessage(arguments, messageKey, messageParameters);
}
}
if (messageResolution == null) {
if (!returnStringAlways) {
return null;
}
return getAbsentMessageRepresentation(messageKey, arguments.getContext().getLocale());
}
return messageResolution.getResolvedMessage();
}