public abstract class AnsiOutput
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AnsiOutput.Enabled
Possible values to pass to
setEnabled(org.springframework.boot.ansi.AnsiOutput.Enabled) . |
Constructor and Description |
---|
AnsiOutput() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
encode(AnsiElement element)
Encode a single
AnsiElement if output is enabled. |
static AnsiOutput.Enabled |
getEnabled()
Returns if ANSI output is enabled
|
static void |
setConsoleAvailable(java.lang.Boolean consoleAvailable)
Sets if the System.console() is known to be available.
|
static void |
setEnabled(AnsiOutput.Enabled enabled)
Sets if ANSI output is enabled.
|
static java.lang.String |
toString(java.lang.Object... elements)
Create a new ANSI string from the specified elements.
|
public static void setEnabled(AnsiOutput.Enabled enabled)
enabled
- if ANSI is enabled, disabled or detectedpublic static AnsiOutput.Enabled getEnabled()
public static void setConsoleAvailable(java.lang.Boolean consoleAvailable)
consoleAvailable
- if the console is known to be available or null
to
use standard detection logic.public static java.lang.String encode(AnsiElement element)
AnsiElement
if output is enabled.element
- the element to encodepublic static java.lang.String toString(java.lang.Object... elements)
AnsiElement
s will
be encoded as required.elements
- the elements to encode