Interface MessageBuilderFactory

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultMessageBuilderFactory

@Experimental public interface MessageBuilderFactory extends Service
A factory for MessageBuilder.
Since:
4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new message builder.
    builder(int size)
    Creates a new message builder of the specified size.
    builder(StringBuilder stringBuilder)
    Creates a new message builder backed by the given string builder.
    int
    Returns the terminal width or -1 if not supported.
    boolean
    Checks if the underlying output does support styling or not.
  • Method Details

    • isColorEnabled

      boolean isColorEnabled()
      Checks if the underlying output does support styling or not.
      Returns:
      whether color styling is supported or not
    • getTerminalWidth

      int getTerminalWidth()
      Returns the terminal width or -1 if not supported.
      Returns:
      the terminal width
    • builder

      Creates a new message builder.
      Returns:
      a new message builder
    • builder

      Creates a new message builder backed by the given string builder.
      Parameters:
      stringBuilder - a string builder
      Returns:
      a new message builder
    • builder

      @Nonnull default MessageBuilder builder(int size)
      Creates a new message builder of the specified size.
      Parameters:
      size - the initial size of the message builder buffer
      Returns:
      a new message builder