Class StyleFactory

java.lang.Object
org.jline.style.StyleFactory

public class StyleFactory extends Object
Factory for creating styled strings using a specific style group.

This class provides methods for creating AttributedStrings with styles applied to them. It uses a StyleResolver to resolve style specifications into AttributedStyle objects.

The factory supports two main ways of creating styled strings:

Example usage:

 StyleFactory factory = Styler.factory("mygroup");

 // Direct styling
 AttributedString text1 = factory.style("bold,fg:red", "Important message");
 AttributedString text2 = factory.style(".error", "Error message"); // Named style

 // Style expression evaluation
 AttributedString text3 = factory.evaluate("Normal text with @{bold,fg:red important} parts");
 
Since:
3.4
See Also: