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 anConfigCustomizerFactory
that will be used to find configuration customizers when thebuild()
} method is called.addExtensionHandlerCustomizer
(ExtensionHandlerCustomizer extensionHandlerCustomizer) Adds anExtensionHandlerCustomizer
that will be used to customize extension handlers when thebuild()
} method is called.addExtensionHandlerFactory
(ExtensionHandlerFactory extensionHandlerFactory) Adds anExtensionHandlerFactory
that 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 newExtensionMetadata
object.Class
<?> Returns the extension type from the builder.
-
Method Details
-
addExtensionHandlerFactory
public ExtensionMetadata.Builder addExtensionHandlerFactory(ExtensionHandlerFactory extensionHandlerFactory) Adds anExtensionHandlerFactory
that will be used to find extension handlers when thebuild()
} method is called.- Parameters:
extensionHandlerFactory
- AnExtensionHandlerFactory
instance- Returns:
- The builder instance
-
addExtensionHandlerCustomizer
public ExtensionMetadata.Builder addExtensionHandlerCustomizer(ExtensionHandlerCustomizer extensionHandlerCustomizer) Adds anExtensionHandlerCustomizer
that will be used to customize extension handlers when thebuild()
} method is called.- Parameters:
extensionHandlerCustomizer
- AnExtensionHandlerCustomizer
instance- Returns:
- The builder instance
-
addConfigCustomizerFactory
public ExtensionMetadata.Builder addConfigCustomizerFactory(ConfigCustomizerFactory configCustomizerFactory) Adds anConfigCustomizerFactory
that will be used to find configuration customizers when thebuild()
} method is called.- Parameters:
configCustomizerFactory
- AnConfigCustomizerFactory
instance- 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
- AnExtensionHandler
instance- Returns:
- The builder instance
-
getExtensionType
Returns the extension type from the builder.- Returns:
- The extension type
-
build
Creates a newExtensionMetadata
object.- Returns:
- A
ExtensionMetadata
object
-