public class DefaultMessageResolver extends java.lang.Object implements MessageResolver, org.springframework.context.MessageSourceResolvable
Constructor and Description |
---|
DefaultMessageResolver(java.lang.Object source,
java.lang.String[] codes,
Severity severity,
java.lang.Object[] args,
java.lang.String defaultText) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getArguments() |
java.lang.String[] |
getCodes() |
java.lang.String |
getDefaultMessage() |
protected java.lang.String |
postProcessMessageText(java.lang.String text)
Subclasses may override to perform special post-processing of the returned message text; for example, running it
through an Expression evaluator.
|
Message |
resolveMessage(org.springframework.context.MessageSource messageSource,
java.util.Locale locale)
Resolve the message from the message source using the current locale.
|
java.lang.String |
toString() |
public DefaultMessageResolver(java.lang.Object source, java.lang.String[] codes, Severity severity, java.lang.Object[] args, java.lang.String defaultText)
public Message resolveMessage(org.springframework.context.MessageSource messageSource, java.util.Locale locale)
MessageResolver
resolveMessage
in interface MessageResolver
messageSource
- the message source, an abstraction for a resource bundlelocale
- the current locale of this requestprotected java.lang.String postProcessMessageText(java.lang.String text)
text
- the resolved message textpublic java.lang.String[] getCodes()
getCodes
in interface org.springframework.context.MessageSourceResolvable
public java.lang.Object[] getArguments()
getArguments
in interface org.springframework.context.MessageSourceResolvable
public java.lang.String getDefaultMessage()
getDefaultMessage
in interface org.springframework.context.MessageSourceResolvable
public java.lang.String toString()
toString
in class java.lang.Object