Interface MessageBuilder


  • @Deprecated
    public interface MessageBuilder
    Deprecated.
    use org.apache.maven.message.MessageBuilderFactory (Maven 3.10.0 and later) or org.apache.maven.api.services.MessageBuilderFactory (Maven 4) instead
    Message builder that supports configurable styling. An instance of this interface can be retrieved with MessageUtils.buffer(). After the message has been constructed with any of the append methods its content can be retrieved with build().
    Since:
    3.1.0
    See Also:
    MessageUtils
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      MessageBuilder a​(char[] value)
      Deprecated.
      Append content to the message buffer.
      MessageBuilder a​(char[] value, int offset, int len)
      Deprecated.
      Append content to the message buffer.
      MessageBuilder a​(java.lang.CharSequence value)
      Deprecated.
      Append content to the message buffer.
      MessageBuilder a​(java.lang.CharSequence value, int start, int end)
      Deprecated.
      Append content to the message buffer.
      MessageBuilder a​(java.lang.Object value)
      Deprecated.
      Append content to the message buffer.
      java.lang.String build()
      Deprecated.
      Get the message constructed by this builder.
      MessageBuilder failure​(java.lang.Object message)
      Deprecated.
      Append message content in failure style.
      MessageBuilder format​(java.lang.String pattern, java.lang.Object... args)
      Deprecated.
      Append formatted content to the buffer.
      MessageBuilder mojo​(java.lang.Object message)
      Deprecated.
      Append message content in mojo style.
      MessageBuilder newline()
      Deprecated.
      Append newline to the message buffer.
      MessageBuilder project​(java.lang.Object message)
      Deprecated.
      Append message content in project style.
      MessageBuilder strong​(java.lang.Object message)
      Deprecated.
      Append message content in strong style.
      MessageBuilder success​(java.lang.Object message)
      Deprecated.
      Append message content in success style.
      java.lang.String toString()
      Deprecated.
      Rather use build()
      MessageBuilder warning​(java.lang.Object message)
      Deprecated.
      Append message content in warning style.
    • Method Detail

      • success

        MessageBuilder success​(java.lang.Object message)
        Deprecated.
        Append message content in success style. By default, bold green.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • warning

        MessageBuilder warning​(java.lang.Object message)
        Deprecated.
        Append message content in warning style. By default, bold yellow.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • failure

        MessageBuilder failure​(java.lang.Object message)
        Deprecated.
        Append message content in failure style. By default, bold red.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • strong

        MessageBuilder strong​(java.lang.Object message)
        Deprecated.
        Append message content in strong style. By default, bold.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • mojo

        MessageBuilder mojo​(java.lang.Object message)
        Deprecated.
        Append message content in mojo style. By default, green.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • project

        MessageBuilder project​(java.lang.Object message)
        Deprecated.
        Append message content in project style. By default, cyan.
        Parameters:
        message - the message to append
        Returns:
        the current builder
      • a

        MessageBuilder a​(char[] value,
                         int offset,
                         int len)
        Deprecated.
        Append content to the message buffer.
        Parameters:
        value - the content to append
        offset - the index of the first char to append
        len - the number of chars to append
        Returns:
        the current builder
      • a

        MessageBuilder a​(char[] value)
        Deprecated.
        Append content to the message buffer.
        Parameters:
        value - the content to append
        Returns:
        the current builder
      • a

        MessageBuilder a​(java.lang.CharSequence value,
                         int start,
                         int end)
        Deprecated.
        Append content to the message buffer.
        Parameters:
        value - the content to append
        start - the starting index of the subsequence to be appended
        end - the end index of the subsequence to be appended
        Returns:
        the current builder
      • a

        MessageBuilder a​(java.lang.CharSequence value)
        Deprecated.
        Append content to the message buffer.
        Parameters:
        value - the content to append
        Returns:
        the current builder
      • a

        MessageBuilder a​(java.lang.Object value)
        Deprecated.
        Append content to the message buffer.
        Parameters:
        value - the content to append
        Returns:
        the current builder
      • newline

        MessageBuilder newline()
        Deprecated.
        Append newline to the message buffer.
        Returns:
        the current builder
      • format

        MessageBuilder format​(java.lang.String pattern,
                              java.lang.Object... args)
        Deprecated.
        Append formatted content to the buffer.
        Parameters:
        pattern - a format string according to the Formatter syntax
        args - arguments referenced by the format specifiers in the format string
        Returns:
        the current builder
        See Also:
        String.format(String, Object...)
      • build

        java.lang.String build()
        Deprecated.
        Get the message constructed by this builder. The underlying buffer is not reset with this method, i.e. if you continue using this builder you just append content to the existing one.
        Returns:
        the message
        Since:
        4.0.0
      • toString

        @Deprecated
        java.lang.String toString()
        Deprecated.
        Rather use build()
        Same as build().
        Overrides:
        toString in class java.lang.Object