Package org.aesh.terminal.utils
Enum ANSIBuilder.SemanticColor
- All Implemented Interfaces:
Serializable,Comparable<ANSIBuilder.SemanticColor>
- Enclosing class:
- ANSIBuilder
Semantic color categories used for theme-aware styling.
Each entry stores a default ANSI code and a capability getter
for resolving the theme-appropriate code at runtime.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCategory color (blue).Debug color (cyan).Error color (red).Fatal color (red).Info color (green).Message color (white).Success color (green).Thread name color (green).Timestamp color (gray).Trace color (gray).Warning color (yellow). -
Method Summary
Modifier and TypeMethodDescriptionintReturns the default ANSI color code for this semantic color.intReturns the suggested ANSI code from the given capability.static ANSIBuilder.SemanticColorReturns the enum constant of this type with the specified name.static ANSIBuilder.SemanticColor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ERROR
Error color (red). -
SUCCESS
Success color (green). -
WARNING
Warning color (yellow). -
INFO
Info color (green). -
DEBUG
Debug color (cyan). -
TRACE
Trace color (gray). -
TIMESTAMP
Timestamp color (gray). -
MESSAGE
Message color (white). -
CATEGORY
Category color (blue). -
THREAD_NAME
Thread name color (green). -
FATAL
Fatal color (red).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
defaultCode
public int defaultCode()Returns the default ANSI color code for this semantic color.- Returns:
- the default ANSI code
-
getFromCapability
Returns the suggested ANSI code from the given capability.- Parameters:
cap- the terminal color capability- Returns:
- the suggested ANSI code
-