Package ch.kk7.confij.binding.collection
Class CollectionBindingFactory
java.lang.Object
ch.kk7.confij.binding.collection.CollectionBindingFactory
- All Implemented Interfaces:
ConfigBindingFactory<CollectionBinding>
public class CollectionBindingFactory extends java.lang.Object implements ConfigBindingFactory<CollectionBinding>
-
Constructor Summary
Constructors Constructor Description CollectionBindingFactory()CollectionBindingFactory(java.util.function.Function<com.fasterxml.classmate.ResolvedType,? extends CollectionBuilder> builderFactory) -
Method Summary
Modifier and Type Method Description static @NonNull com.fasterxml.classmate.ResolvedTypecollectionComponentType(com.fasterxml.classmate.ResolvedType type)java.util.Optional<CollectionBinding>maybeCreate(BindingType bindingType, ConfigBinder configBinder)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CollectionBindingFactory
public CollectionBindingFactory() -
CollectionBindingFactory
public CollectionBindingFactory(java.util.function.Function<com.fasterxml.classmate.ResolvedType,? extends CollectionBuilder> builderFactory)
-
-
Method Details
-
collectionComponentType
@NonNull public static @NonNull com.fasterxml.classmate.ResolvedType collectionComponentType(com.fasterxml.classmate.ResolvedType type) -
maybeCreate
public java.util.Optional<CollectionBinding> maybeCreate(BindingType bindingType, ConfigBinder configBinder)- Specified by:
maybeCreatein interfaceConfigBindingFactory<CollectionBinding>- Parameters:
bindingType- java-type and binding context to be processedconfigBinder- the binder holding together all the factories- Returns:
- a binding if this factory can process this bindingType, empty otherwise
-