Class Styler

java.lang.Object
org.jline.style.Styler

public class Styler extends Object
Style facade.
Since:
3.4
See Also:
  • Method Details

    • getSource

      public static StyleSource getSource()
      Returns global StyleSource.
      Returns:
      the global style source
    • setSource

      public static void setSource(StyleSource source)
      Install global StyleSource.
      Parameters:
      source - the new global style source
    • resolver

      public static StyleResolver resolver(String group)
      Create a resolver for the given style-group.
      Parameters:
      group - the group
      Returns:
      the resolver
    • factory

      public static StyleFactory factory(String group)
      Create a factory for the given style-group.
      Parameters:
      group - the group
      Returns:
      the factory
    • bundle

      public static <T extends StyleBundle> T bundle(Class<T> type)
      Create a StyleBundle proxy.

      Target class must be annotated with StyleBundle.StyleGroup.

      Type Parameters:
      T - the interface to proxy
      Parameters:
      type - the interface to proxy
      Returns:
      the proxy
    • bundle

      public static <T extends StyleBundle> T bundle(String group, Class<T> type)
      Create a StyleBundle proxy with explicit style-group.
      Type Parameters:
      T - the interface to proxy
      Parameters:
      group - the group
      type - the interface to proxy
      Returns:
      the proxy