Package org.jdbi.v3.core.extension
Enum ExtensionFactory.FactoryFlag
java.lang.Object
java.lang.Enum<ExtensionFactory.FactoryFlag>
org.jdbi.v3.core.extension.ExtensionFactory.FactoryFlag
- All Implemented Interfaces:
Serializable
,Comparable<ExtensionFactory.FactoryFlag>
- Enclosing interface:
- ExtensionFactory
Flags that the factory can return to control aspects of the extension framework.
- Since:
- 3.38.0
-
Enum Constant Summary
Enum ConstantDescriptionDo not wrap the backing object methods intoExtensionHandler
instances and return aProxy
instance but return it as is.The factory provides a concrete instance to back the extension type. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionFactory.FactoryFlag
Returns the enum constant of this type with the specified name.static ExtensionFactory.FactoryFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NON_VIRTUAL_FACTORY
The factory provides a concrete instance to back the extension type.
Unless this flag is present, factories do not create an object to attach to but register method handlers for every method on an extension type.
E.g. the SQLObject handler is an example of a virtual factory that processes every method in an interface class without requiring an implementation of the extension type. The extension framework will execute the method handlers and pass in a proxy object instead of an underlying instance.
When this flag is present, theExtensionFactory.attach(Class, HandleSupplier)
method will never be called. -
DONT_USE_PROXY
Do not wrap the backing object methods intoExtensionHandler
instances and return aProxy
instance but return it as is. This allows the factory to suport class objects as well as interfaces.
This is a corner use case and should normally not be used by any standard extension.
Legacy extension factories that need every method on an interface forwarded to the underlying implementation class can set this flag to bypass the proxy logic of the extension framework.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-