Spring Framework

org.springframework.context
Interface MessageSourceResolvable

All Known Implementing Classes:
DefaultMessageSourceResolvable, FieldError, ObjectError

public interface MessageSourceResolvable

Interface for objects that are suitable for message resolution in a MessageSource.

Spring's own validation error classes implement this interface.

Author:
Juergen Hoeller
See Also:
MessageSource.getMessage(MessageSourceResolvable, java.util.Locale), ObjectError, FieldError

Method Summary
 java.lang.Object[] getArguments()
          Return the array of arguments to be used to resolve this message.
 java.lang.String[] getCodes()
          Return the codes to be used to resolve this message, in the order that they should get tried.
 java.lang.String getDefaultMessage()
          Return the default message to be used to resolve this message.
 

Method Detail

getCodes

java.lang.String[] getCodes()
Return the codes to be used to resolve this message, in the order that they should get tried. The last code will therefore be the default one.

Returns:
a String array of codes which are associated with this message

getArguments

java.lang.Object[] getArguments()
Return the array of arguments to be used to resolve this message.

Returns:
an array of objects to be used as parameters to replace placeholders within the message text
See Also:
MessageFormat

getDefaultMessage

java.lang.String getDefaultMessage()
Return the default message to be used to resolve this message.

Returns:
the default message, or null if no default

Spring Framework