Package io.micronaut.core.util
Enum Class AnsiColour
- All Implemented Interfaces:
Serializable
,Comparable<AnsiColour>
,Constable
Ansi color coding.
- Since:
- 4.8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionFormat blue.static String
brightBlue
(String text) Highlight in bright blue.static String
brightCyan
(String text) Highlight bright cyan if supported.static String
brightYellow
(String text) Output bright yellow.static String
Highlight cyan if supported.formatObject
(@Nullable Object object) Format an object for display.static String
Output green.static boolean
Are ANSI colors supported.static String
magentaBold
(String text) Output in magenta bold.toString()
static AnsiColour
Returns the enum constant of this class with the specified name.static AnsiColour[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.static String
Highlight in yellow.
-
Enum Constant Details
-
RESET
-
BLACK
-
RED
-
GREEN
-
YELLOW
-
BLUE
-
MAGENTA
-
CYAN
-
WHITE
-
BLACK_BOLD
-
RED_BOLD
-
GREEN_BOLD
-
YELLOW_BOLD
-
BLUE_BOLD
-
MAGENTA_BOLD
-
CYAN_BOLD
-
WHITE_BOLD
-
BLACK_UNDERLINED
-
RED_UNDERLINED
-
GREEN_UNDERLINED
-
YELLOW_UNDERLINED
-
BLUE_UNDERLINED
-
MAGENTA_UNDERLINED
-
CYAN_UNDERLINED
-
WHITE_UNDERLINED
-
BLACK_BACKGROUND
-
RED_BACKGROUND
-
GREEN_BACKGROUND
-
YELLOW_BACKGROUND
-
BLUE_BACKGROUND
-
MAGENTA_BACKGROUND
-
CYAN_BACKGROUND
-
WHITE_BACKGROUND
-
BLACK_BRIGHT
-
RED_BRIGHT
-
GREEN_BRIGHT
-
YELLOW_BRIGHT
-
BLUE_BRIGHT
-
MAGENTA_BRIGHT
-
CYAN_BRIGHT
-
WHITE_BRIGHT
-
BLACK_BOLD_BRIGHT
-
RED_BOLD_BRIGHT
-
GREEN_BOLD_BRIGHT
-
YELLOW_BOLD_BRIGHT
-
BLUE_BOLD_BRIGHT
-
MAGENTA_BOLD_BRIGHT
-
CYAN_BOLD_BRIGHT
-
WHITE_BOLD_BRIGHT
-
BLACK_BACKGROUND_BRIGHT
-
RED_BACKGROUND_BRIGHT
-
GREEN_BACKGROUND_BRIGHT
-
YELLOW_BACKGROUND_BRIGHT
-
BLUE_BACKGROUND_BRIGHT
-
MAGENTA_BACKGROUND_BRIGHT
-
CYAN_BACKGROUND_BRIGHT
-
WHITE_BACKGROUND_BRIGHT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
cyan
Highlight cyan if supported.- Parameters:
text
- The text- Returns:
- the string
-
brightCyan
Highlight bright cyan if supported.- Parameters:
text
- The text- Returns:
- the string
-
yellow
Highlight in yellow.- Parameters:
text
- The text- Returns:
- The formatted string
-
brightBlue
Highlight in bright blue.- Parameters:
text
- The text- Returns:
- The formatted string
-
magentaBold
Output in magenta bold.- Parameters:
text
- The text- Returns:
- The formatted text.
-
green
Output green.- Parameters:
text
- The text- Returns:
- The formatted text
-
brightYellow
Output bright yellow.- Parameters:
text
- The text- Returns:
- The formatted text
-
formatObject
Format an object for display.- Parameters:
object
- The object- Returns:
- The formatted object
-
blue
Format blue.- Parameters:
text
- The text- Returns:
- The formatted text
-
toString
- Overrides:
toString
in classEnum<AnsiColour>
-
isSupported
public static boolean isSupported()Are ANSI colors supported.- Returns:
- True if they are
-