Package org.jline.style
Class StyleFactory
- java.lang.Object
-
- org.jline.style.StyleFactory
-
public class StyleFactory extends java.lang.Object
Factory to create styled strings.- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description StyleFactory(StyleResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jline.utils.AttributedString
evaluate(java.lang.String expression)
Evaluate a style expression.org.jline.utils.AttributedString
evaluate(java.lang.String format, java.lang.Object... params)
Evaluate a style expression with format.org.jline.utils.AttributedString
style(java.lang.String style, java.lang.String value)
Encode string with style applying value.org.jline.utils.AttributedString
style(java.lang.String style, java.lang.String format, java.lang.Object... params)
Encode string with style formatted value.
-
-
-
Constructor Detail
-
StyleFactory
public StyleFactory(StyleResolver resolver)
-
-
Method Detail
-
style
public org.jline.utils.AttributedString style(java.lang.String style, java.lang.String value)
Encode string with style applying value.- Parameters:
style
- the stylevalue
- the value- Returns:
- the result string
-
style
public org.jline.utils.AttributedString style(java.lang.String style, java.lang.String format, java.lang.Object... params)
Encode string with style formatted value.- Parameters:
style
- the styleformat
- the formatparams
- the parameters- Returns:
- the result string
- See Also:
style(String, String)
-
evaluate
public org.jline.utils.AttributedString evaluate(java.lang.String expression)
Evaluate a style expression.- Parameters:
expression
- the expression to evaluate- Returns:
- the result string
-
evaluate
public org.jline.utils.AttributedString evaluate(java.lang.String format, java.lang.Object... params)
Evaluate a style expression with format.- Parameters:
format
- the formatparams
- the parameters- Returns:
- the result string
- See Also:
evaluate(String)
-
-