Class Style.SingularCode

java.lang.Object
software.amazon.smithy.cli.Style.SingularCode
All Implemented Interfaces:
Style
Enclosing interface:
Style

public static final class Style.SingularCode extends Object implements Style
A simple implementation of Style that pushes a single code.
  • Constructor Details

    • SingularCode

      public SingularCode(int code)
  • Method Details

    • pushCodes

      public void pushCodes(IntConsumer codeConsumer)
      Description copied from interface: Style
      Pushes one or more ANSI color codes to the consumer.

      Most implementations will push a single code, but multiple codes are needed to do things like use 8-bit colors (e.g., 38+5+206 to make pink foreground text).

      Specified by:
      pushCodes in interface Style
      Parameters:
      codeConsumer - Consumer to push integers to.