org.springframework.context

Interface MessageSourceResolvable

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method and Description
      default 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.
      default java.lang.String getDefaultMessage()
      Return the default message to be used to resolve this message.
    • Method Detail

      • getCodes

        @Nullable
        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

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

        The default implementation simply returns null.

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

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

        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.

        Returns:
        the default message, or null if no default