public class Extensions extends Object implements JdbiConfig<Extensions>
Jdbi extensions via ExtensionFactory
instances.| Constructor and Description |
|---|
Extensions()
Create an empty
ExtensionFactory configuration. |
| Modifier and Type | Method and Description |
|---|---|
Extensions |
createCopy()
Returns a copy of this configuration object.
|
<F extends ExtensionFactory> |
findFactory(Class<F> factoryType)
Find the registered factory of the given type, if any
|
<E> Optional<E> |
findFor(Class<E> extensionType,
HandleSupplier handle)
Create an extension instance if we have a factory that understands
the extension type which has access to a
Handle through a HandleSupplier. |
boolean |
hasExtensionFor(Class<?> extensionType) |
Extensions |
register(ExtensionFactory factory)
Register an extension factory.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetRegistrypublic Extensions()
ExtensionFactory configuration.public Extensions createCopy()
JdbiConfigcreateCopy in interface JdbiConfig<Extensions>public <F extends ExtensionFactory> Optional<F> findFactory(Class<F> factoryType)
F - the factory type to findfactoryType - the factory's type to findpublic <E> Optional<E> findFor(Class<E> extensionType, HandleSupplier handle)
Handle through a HandleSupplier.E - the extension type to createextensionType - the extension type to createhandle - the handle supplierpublic boolean hasExtensionFor(Class<?> extensionType)
extensionType - the type to querypublic Extensions register(ExtensionFactory factory)
factory - the factory to registerCopyright © 2017. All rights reserved.