Package org.jline.style
Annotation Type StyleBundle.DefaultStyle
-
@Retention(RUNTIME) @Target(METHOD) @Documented public static @interface StyleBundle.DefaultStyleAnnotation that provides a default style specification for a method in a StyleBundle interface.This annotation specifies the style to use if no style is found in the
StyleSourcefor the method. The value should be a valid style specification string as understood byStyleResolver.Example:
@StyleBundle.StyleGroup("mygroup") interface MyStyles extends StyleBundle { @StyleBundle.DefaultStyle("bold,fg:red") AttributedString error(String message); @StyleBundle.DefaultStyle("fg:blue,underline") AttributedString link(String url); }If this annotation is not present and no style is found in the style source, a
StyleBundleInvocationHandler.StyleBundleMethodMissingDefaultStyleExceptionwill be thrown when the method is called.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Stringvalue
-