- java.lang.Object
-
- org.jline.style.Styler
-
public class Styler extends Object
Style facade.- Since:
- 3.4
- See Also:
StyleBundle,StyleFactory,StyleSource
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends StyleBundle>
Tbundle(Class<T> type)Create aStyleBundleproxy.static <T extends StyleBundle>
Tbundle(String group, Class<T> type)Create aStyleBundleproxy with explicit style-group.static StyleFactoryfactory(String group)Create a factory for the given style-group.static StyleSourcegetSource()Returns globalStyleSource.static StyleResolverresolver(String group)Create a resolver for the given style-group.static voidsetSource(StyleSource source)Install globalStyleSource.
-
-
-
Method Detail
-
getSource
public static StyleSource getSource()
Returns globalStyleSource.- Returns:
- the global style source
-
setSource
public static void setSource(StyleSource source)
Install globalStyleSource.- 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 aStyleBundleproxy.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 aStyleBundleproxy with explicit style-group.- Type Parameters:
T- the interface to proxy- Parameters:
group- the grouptype- the interface to proxy- Returns:
- the proxy
-
-