Package org.jdbi.v3.core.extension
Class ExtensionMetadata
java.lang.Object
org.jdbi.v3.core.extension.ExtensionMetadata
Metadata that was detected when analyzing an extension class before attaching.
Represents a resolved extension type with all config customizers and method handlers.
- Since:
- 3.38.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for theExtensionMetadata
object.final class
Wraps all config customizers and the handler for a specific method execution. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionMetadata.Builder
Returns a newExtensionMetadata.Builder
instance.createExtensionHandlerInvoker
(E target, Method method, HandleSupplier handleSupplier, ConfigRegistry config) Creates anExtensionMetadata.ExtensionHandlerInvoker
instance for a specific method.Create an instance specific configuration based on all instance customizers.createMethodConfiguration
(Method method, ConfigRegistry config) Create an method specific configuration based on all method customizers.Class<?>
Returns a set of all Methods that haveExtensionHandler
objects associated with them.
-
Method Details
-
builder
Returns a newExtensionMetadata.Builder
instance.- Parameters:
extensionType
- The extension type for which metadata is collected- Returns:
- A new
ExtensionMetadata.Builder
instance
-
extensionType
-
createInstanceConfiguration
Create an instance specific configuration based on all instance customizers. The instance configuration holds all custom configuration that was applied e.g. through instance annotations.- Parameters:
config
- A configuration object. The object is not changed- Returns:
- A new configuration object with all changes applied
-
createMethodConfiguration
Create an method specific configuration based on all method customizers. The method configuration holds all custom configuration that was applied e.g. through method annotations.- Parameters:
method
- The method that is about to be calledconfig
- A configuration object. The object is not changed- Returns:
- A new configuration object with all changes applied
-
getExtensionMethods
Returns a set of all Methods that haveExtensionHandler
objects associated with them. -
createExtensionHandlerInvoker
public <E> ExtensionMetadata.ExtensionHandlerInvoker createExtensionHandlerInvoker(E target, Method method, HandleSupplier handleSupplier, ConfigRegistry config) Creates anExtensionMetadata.ExtensionHandlerInvoker
instance for a specific method.- Type Parameters:
E
- THe type of the target object- Parameters:
target
- The target object on which the invoker should workmethod
- The method which will trigger the invocationhandleSupplier
- AHandleSupplier
that will provide the handle object for the extension methodconfig
- The configuration object which should be used as base for the method specific configuration- Returns:
- A
ExtensionMetadata.ExtensionHandlerInvoker
object that is linked to the method
-