类 AnsiOutput
java.lang.Object
org.springframework.boot.ansi.AnsiOutput
Generates ANSI encoded output, automatically attempting to detect if the terminal
supports ANSI.
- 从以下版本开始:
- 1.0.0
- 作者:
- Phillip Webb, Yong-Hyun Kim
-
嵌套类概要
嵌套类修饰符和类型类说明static enum
Possible values to pass tosetEnabled(org.springframework.boot.ansi.AnsiOutput.Enabled)
. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static String
encode
(AnsiElement element) Encode a singleAnsiElement
if output is enabled.static AnsiOutput.Enabled
Returns if ANSI output is enabledstatic void
setConsoleAvailable
(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 String
Create a new ANSI string from the specified elements.
-
构造器详细资料
-
AnsiOutput
public AnsiOutput()
-
-
方法详细资料
-
setEnabled
Sets if ANSI output is enabled.- 参数:
enabled
- if ANSI is enabled, disabled or detected
-
getEnabled
Returns if ANSI output is enabled- 返回:
- if ANSI enabled, disabled or detected
-
setConsoleAvailable
Sets if the System.console() is known to be available.- 参数:
consoleAvailable
- if the console is known to be available ornull
to use standard detection logic.
-
encode
Encode a singleAnsiElement
if output is enabled.- 参数:
element
- the element to encode- 返回:
- the encoded element or an empty string
-
toString
Create a new ANSI string from the specified elements. AnyAnsiElement
s will be encoded as required.- 参数:
elements
- the elements to encode- 返回:
- a string of the encoded elements
-