Enum Class ConsoleIcon
- All Implemented Interfaces:
Serializable,Comparable<ConsoleIcon>,Constable
Console icons for Maven upgrade tool output.
Each icon has a Unicode character and an ASCII fallback.
The appropriate representation is chosen based on the terminal's charset capabilities.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the ASCII fallback text for this icon.getIcon(org.jline.terminal.Terminal terminal) Returns the appropriate icon representation for the given terminal.charReturns the Unicode character for this icon.static ConsoleIconReturns the enum constant of this class with the specified name.static ConsoleIcon[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
Success/completion icon. -
ERROR
Error/failure icon. -
WARNING
Warning icon. -
DETAIL
Detail/bullet point icon. -
ACTION
Action/arrow icon.
-
-
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
-
getIcon
Returns the appropriate icon representation for the given terminal. Tests if the terminal's charset can encode the Unicode character, falling back to ASCII if not.- Parameters:
terminal- the terminal to get the icon for- Returns:
- the Unicode character if supported, otherwise the ASCII fallback
-
getUnicodeChar
public char getUnicodeChar()Returns the Unicode character for this icon.- Returns:
- the Unicode character
-
getAsciiFallback
Returns the ASCII fallback text for this icon.- Returns:
- the ASCII fallback text
-