Package org.jdbi.v3.core.extension
Class UseAnnotationExtensionHandlerCustomizer
- java.lang.Object
-
- org.jdbi.v3.core.extension.UseAnnotationExtensionHandlerCustomizer
-
- All Implemented Interfaces:
ExtensionHandlerCustomizer
final class UseAnnotationExtensionHandlerCustomizer extends java.lang.Object implements ExtensionHandlerCustomizer
Applies decorations to method handlers, according to anyUseExtensionHandlerCustomizerdecorating annotations present on the method. If multiple decorating annotations are present, the order of application can be controlled using theExtensionHandlerCustomizationOrderannotation.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static ExtensionHandlerCustomizerINSTANCE
-
Constructor Summary
Constructors Constructor Description UseAnnotationExtensionHandlerCustomizer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Comparator<java.lang.Class<? extends java.lang.annotation.Annotation>>createComparator(ExtensionHandlerCustomizationOrder order)private static ExtensionHandlerCustomizercreateCustomizer(java.lang.Class<? extends ExtensionHandlerCustomizer> customizerType, java.lang.Class<?> extensionObjectType, java.lang.reflect.Method method)ExtensionHandlercustomize(ExtensionHandler delegate, java.lang.Class<?> extensionType, java.lang.reflect.Method method)Customize an extension handler.
-
-
-
Field Detail
-
INSTANCE
static final ExtensionHandlerCustomizer INSTANCE
-
-
Method Detail
-
customize
public ExtensionHandler customize(ExtensionHandler delegate, java.lang.Class<?> extensionType, java.lang.reflect.Method method)
Description copied from interface:ExtensionHandlerCustomizerCustomize an extension handler.- Specified by:
customizein interfaceExtensionHandlerCustomizer- Parameters:
delegate- TheExtensionHandlerto customizeextensionType- The extension type classmethod- A method- Returns:
- An
ExtensionHandlerobject. This can be the same as thehandlerparameter or another instance that delegates to the original handler
-
createComparator
private java.util.Comparator<java.lang.Class<? extends java.lang.annotation.Annotation>> createComparator(ExtensionHandlerCustomizationOrder order)
-
createCustomizer
private static ExtensionHandlerCustomizer createCustomizer(java.lang.Class<? extends ExtensionHandlerCustomizer> customizerType, java.lang.Class<?> extensionObjectType, java.lang.reflect.Method method)
-
-