Package org.springframework.shell.style
Class ThemeResolver
java.lang.Object
org.springframework.shell.style.ThemeResolver
Service which helps to do various things with styles.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Stores resolved values forresolveValues(AttributedStyle)
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.jline.utils.AttributedString
evaluateExpression
(String expression) Evaluate expression.resolveFigureTag
(String tag) Resolve figure from a tag with activated theme.org.jline.utils.AttributedStyle
resolveStyle
(String spec) ResolveAttributedStyle
from aspec
.resolveStyleTag
(String tag) Resolve style from a tag with activated theme.resolveStyleTag
(String tag, String themeName) Resolve style from a tag with given theme.resolveValues
(org.jline.utils.AttributedStyle attributedStyle) Resolvestyle
,foreground color
andbackground color
from anAttributedStyle
.Return all known theme names.
-
Constructor Details
-
ThemeResolver
-
-
Method Details
-
resolveValues
Resolvestyle
,foreground color
andbackground color
from anAttributedStyle
.- Parameters:
attributedStyle
- the attibuted style- Returns:
- resolved values
-
themeNames
Return all known theme names.- Returns:
- all theme names
-
evaluateExpression
Evaluate expression.- Parameters:
expression
- the expression- Returns:
- evaluated attributed string
-
resolveStyleTag
Resolve style from a tag with activated theme.- Parameters:
tag
- the tag- Returns:
- a style
-
resolveStyleTag
Resolve style from a tag with given theme.- Parameters:
tag
- the tagthemeName
- the theme name- Returns:
- a style
-
resolveFigureTag
Resolve figure from a tag with activated theme.- Parameters:
tag
- the tag- Returns:
- a style
-
resolveStyle
ResolveAttributedStyle
from aspec
.- Parameters:
spec
- the spec- Returns:
- resolved attributed style
-