Package org.jdbi.v3.vavr
Class VavrCollectorFactory
java.lang.Object
org.jdbi.v3.vavr.VavrCollectorFactory
- All Implemented Interfaces:
CollectorFactory
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccept aTypeas a collector.Collector<?,?, ?> Creates a collector for a given container type.elementType(Type containerType) Returns the element type for a given container type.private Class<?>getCollectionType(Type containerType) private booleanhasDefaultImplementationWithCollector(Class<?> erasedType) private io.vavr.control.Option<Collector<?,?, ?>> resolveDefaultCollector(Class<?> erasedType) private static TyperesolveMaplikeEntryType(Type maplikeType, Class<?> maplikeClass)
-
Field Details
-
defaultImplementations
-
collectors
-
-
Constructor Details
-
VavrCollectorFactory
VavrCollectorFactory()
-
-
Method Details
-
accepts
Description copied from interface:CollectorFactoryAccept aTypeas a collector.- Specified by:
acceptsin interfaceCollectorFactory- Parameters:
containerType- the container type.- Returns:
- whether this factory can produce a collector for the given container type.
-
getCollectionType
-
hasDefaultImplementationWithCollector
-
resolveDefaultCollector
-
elementType
Description copied from interface:CollectorFactoryReturns the element type for a given container type.- Specified by:
elementTypein interfaceCollectorFactory- Parameters:
containerType- the container type.- Returns:
- the container element type if it can be discovered through reflection; empty otherwise.
- See Also:
-
build
Description copied from interface:CollectorFactoryCreates a collector for a given container type.- Specified by:
buildin interfaceCollectorFactory- Parameters:
containerType- the container type.- Returns:
- a
Collectorfor the given container type. - See Also:
-
resolveMaplikeEntryType
-