Interface MessageKey

All Known Implementing Classes:
RiskscapeMessage

public interface MessageKey

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

Inspired/Copied from: https://docs.spring.io/spring-framework/docs/current/javadoc-api/ org/springframework/context/MessageSourceResolvable.html

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Object[]
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the code that identifies this message in ResourceBundle lookups.
    default String
    Return the default message to be used to resolve this message should lookups of 'code' fail to find a message.
    default Object[]
    Return the array of arguments to be used to resolve this message.
  • Field Details

    • NO_ARGS

      static final Object[] NO_ARGS
  • Method Details

    • getCode

      String getCode()

      Return the code that identifies this message in ResourceBundle lookups.

    • getMessageArguments

      default Object[] getMessageArguments()

      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
    • getDefaultMessage

      default String getDefaultMessage()

      Return the default message to be used to resolve this message should lookups of 'code' fail to find a message.

      Returns:
      the default message, or null if no default