Package org.jline.style
Class Styler
- java.lang.Object
-
- org.jline.style.Styler
-
public class Styler extends java.lang.ObjectStyle facade.- Since:
- 3.4
- See Also:
StyleBundle,StyleFactory,StyleSource
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Loggerlogprivate static StyleSourcesource
-
Constructor Summary
Constructors Modifier Constructor Description privateStyler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends StyleBundle>
Tbundle(java.lang.Class<T> type)Create aStyleBundleproxy.static <T extends StyleBundle>
Tbundle(java.lang.String group, java.lang.Class<T> type)Create aStyleBundleproxy with explicit style-group.static StyleFactoryfactory(java.lang.String group)Create a factory for the given style-group.static StyleSourcegetSource()Returns globalStyleSource.static StyleResolverresolver(java.lang.String group)Create a resolver for the given style-group.static voidsetSource(StyleSource source)Install globalStyleSource.
-
-
-
Field Detail
-
log
private static final java.util.logging.Logger log
-
source
private static volatile StyleSource source
-
-
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(java.lang.String group)
Create a resolver for the given style-group.- Parameters:
group- the group- Returns:
- the resolver
-
factory
public static StyleFactory factory(java.lang.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(java.lang.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(java.lang.String group, java.lang.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
-
-