Enum Class ConsoleIcon

java.lang.Object
java.lang.Enum<ConsoleIcon>
org.apache.maven.cling.invoker.mvnup.ConsoleIcon
All Implemented Interfaces:
Serializable, Comparable<ConsoleIcon>, Constable

public enum ConsoleIcon extends Enum<ConsoleIcon>
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.
  • Enum Constant Details

    • SUCCESS

      public static final ConsoleIcon SUCCESS
      Success/completion icon.
    • ERROR

      public static final ConsoleIcon ERROR
      Error/failure icon.
    • WARNING

      public static final ConsoleIcon WARNING
      Warning icon.
    • DETAIL

      public static final ConsoleIcon DETAIL
      Detail/bullet point icon.
    • ACTION

      public static final ConsoleIcon ACTION
      Action/arrow icon.
  • Method Details

    • values

      public static ConsoleIcon[] 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

      public static ConsoleIcon valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getIcon

      public String getIcon(org.jline.terminal.Terminal terminal)
      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

      public String getAsciiFallback()
      Returns the ASCII fallback text for this icon.
      Returns:
      the ASCII fallback text