Package org.jline.style
Class StyleBundleInvocationHandler
java.lang.Object
org.jline.style.StyleBundleInvocationHandler
- All Implemented Interfaces:
InvocationHandler
StyleBundle proxy invocation-handler to convert method calls into string styling.- Since:
- 3.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classThrown when processingStyleBundlemethod is found to be invalid.(package private) static classThrown when looking upStyleBundle.StyleGroupon a type found to be missing or invalid.(package private) static classThrown whenStyleBundlemethod has missingStyleBundle.DefaultStyle. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Loggerprivate final StyleResolverprivate final Class<? extends StyleBundle> -
Constructor Summary
ConstructorsConstructorDescriptionStyleBundleInvocationHandler(Class<? extends StyleBundle> type, StyleResolver resolver) -
Method Summary
Modifier and TypeMethodDescription(package private) static <T extends StyleBundle>
Tcreate(StyleResolver resolver, Class<T> type) Internal factory-method.(package private) static <T extends StyleBundle>
Tcreate(StyleSource source, Class<T> type) Internal factory-method.private static StringemptyToNull(String value) private static StringgetDefaultStyle(Method method) Returns the default-style for given method, ornullif unable to determine.private static StringgetStyleGroup(Class<?> type) Returns the style group-name for given type, ornullif unable to determine.private static StringgetStyleName(Method method) Returns the style-name for given method, ornullif unable to determine.toString()Slightly better logging for proxies.private static voidThrowsStyleBundleInvocationHandler.InvalidStyleBundleMethodExceptionif given method is not suitable.
-
Field Details
-
log
-
type
-
resolver
-
-
Constructor Details
-
StyleBundleInvocationHandler
-
-
Method Details
-
validate
ThrowsStyleBundleInvocationHandler.InvalidStyleBundleMethodExceptionif given method is not suitable. -
emptyToNull
-
getStyleGroup
Returns the style group-name for given type, ornullif unable to determine. -
getStyleName
Returns the style-name for given method, ornullif unable to determine. -
getDefaultStyle
Returns the default-style for given method, ornullif unable to determine. -
create
Internal factory-method.- See Also:
-
create
Internal factory-method.- See Also:
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
toString
Slightly better logging for proxies.
-