Package org.jdbi.v3.core.extension
Class ExtensionMetadata.Builder
java.lang.Object
org.jdbi.v3.core.extension.ExtensionMetadata.Builder
- Enclosing class:
ExtensionMetadata
Builder class for the
ExtensionMetadata object.
See ExtensionMetadata.builder(Class).-
Method Summary
Modifier and TypeMethodDescriptionaddConfigCustomizerFactory(ConfigCustomizerFactory configCustomizerFactory) Adds anConfigCustomizerFactorythat will be used to find configuration customizers when thebuild()} method is called.addExtensionHandlerCustomizer(ExtensionHandlerCustomizer extensionHandlerCustomizer) Adds anExtensionHandlerCustomizerthat will be used to customize extension handlers when thebuild()} method is called.addExtensionHandlerFactory(ExtensionHandlerFactory extensionHandlerFactory) Adds anExtensionHandlerFactorythat will be used to find extension handlers when thebuild()} method is called.addInstanceConfigCustomizer(ConfigCustomizer configCustomizer) Add an instance specific configuration customizer.addMethodConfigCustomizer(Method method, ConfigCustomizer configCustomizer) Add a method specific configuration customizer.addMethodHandler(Method method, ExtensionHandler handler) Adds a new extension handler for a method.build()Creates a newExtensionMetadataobject.Class<?> Returns the extension type from the builder.
-
Method Details
-
addExtensionHandlerFactory
public ExtensionMetadata.Builder addExtensionHandlerFactory(ExtensionHandlerFactory extensionHandlerFactory) Adds anExtensionHandlerFactorythat will be used to find extension handlers when thebuild()} method is called.- Parameters:
extensionHandlerFactory- AnExtensionHandlerFactoryinstance- Returns:
- The builder instance
-
addExtensionHandlerCustomizer
public ExtensionMetadata.Builder addExtensionHandlerCustomizer(ExtensionHandlerCustomizer extensionHandlerCustomizer) Adds anExtensionHandlerCustomizerthat will be used to customize extension handlers when thebuild()} method is called.- Parameters:
extensionHandlerCustomizer- AnExtensionHandlerCustomizerinstance- Returns:
- The builder instance
-
addConfigCustomizerFactory
public ExtensionMetadata.Builder addConfigCustomizerFactory(ConfigCustomizerFactory configCustomizerFactory) Adds anConfigCustomizerFactorythat will be used to find configuration customizers when thebuild()} method is called.- Parameters:
configCustomizerFactory- AnConfigCustomizerFactoryinstance- Returns:
- The builder instance
-
addInstanceConfigCustomizer
Add an instance specific configuration customizer. This customizer will be applied to all methods on the extension type.- Parameters:
configCustomizer- AConfigCustomizer- Returns:
- The builder instance
-
addMethodConfigCustomizer
public ExtensionMetadata.Builder addMethodConfigCustomizer(Method method, ConfigCustomizer configCustomizer) Add a method specific configuration customizer. This customizer will be applied only to the method given here.- Parameters:
method- A method objectconfigCustomizer- AConfigCustomizer- Returns:
- The builder instance
-
addMethodHandler
Adds a new extension handler for a method.- Parameters:
method- The method for which an extension handler should be registered.handler- AnExtensionHandlerinstance- Returns:
- The builder instance
-
getExtensionType
Returns the extension type from the builder.- Returns:
- The extension type
-
build
Creates a newExtensionMetadataobject.- Returns:
- A
ExtensionMetadataobject
-