Class TerminalCapabilities

java.lang.Object
org.ek9lang.compiler.common.TerminalCapabilities

public final class TerminalCapabilities extends Object
The colour, Unicode and emoji capabilities of the terminal this process writes to, detected once (and again by resetTestMode()) - see TerminalColors, THE formatting functions that read it.

There is exactly one: PROCESS. Tests that force a mode (forcePlainTextMode(), forceColorMode()) change it for the whole process and restore it with resetTestMode(); such tests run isolated.

  • Field Details

    • PROCESS

      public static final TerminalCapabilities PROCESS
      THE terminal capabilities of this process. The terminal is one fact for the run, so this is the one documented process-wide holder (Steve, 2026-10-28, no static methods: the state stays process-wide, the behaviour is held as instances): every TerminalColors reads it, and a test that forces a mode changes it for all of them.
  • Method Details

    • forcePlainTextMode

      public void forcePlainTextMode()
      Force plain text mode for testing (no colors, no unicode, no emoji). Call resetTestMode() after test to restore auto-detection.
    • forceColorMode

      public void forceColorMode()
      Force full color/emoji mode for testing. Call resetTestMode() after test to restore auto-detection.
    • resetTestMode

      public void resetTestMode()
      Reset to auto-detection mode after testing.
    • isColorsSupported

      public boolean isColorsSupported()
    • isUnicodeSupported

      public boolean isUnicodeSupported()
    • isEmojiSupported

      public boolean isEmojiSupported()