Package ch.qos.cal10n

Interface IMessageConveyor

  • All Known Implementing Classes:
    MessageConveyor

    public interface IMessageConveyor
    Retrieve a localized message by its key as specified by an enum.

    The strategy in retrieving messages may vary from implementation to implementation.

    • Method Detail

      • getMessage

        <E extends java.lang.Enum<?>> java.lang.String getMessage​(E key,
                                                                  java.lang.Object... args)
                                                           throws MessageConveyorException
        Retrieve a localized message by its key as specified by an enum.

        Note that any further arguments passed in 'args' will be interpolated using the translated message. The interpolation will be done by and according to conventions of MessageFormat.

        Type Parameters:
        E - an enum type
        Parameters:
        key - an enum instance
        args - optional arguments
        Returns:
        The translated/localized message
        Throws:
        MessageConveyorException