Class BindingBuilder<B extends InjectorBuilder<B,I> , I extends Injector<I,B> >
java.lang.Object
honeyroasted.fill.bindings.BindingBuilder<B,I>
An intermediate builder that takes a
Matcher and ReflectionInjectorBuilder and constructs a Binding and
adds it to the ReflectionInjectorBuilder-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionto(BiFunction<InjectionTarget, honeyroasted.jype.system.JTypeSystem, InjectionResult> factory) Creates a binding with the given factory and adds it to the parent buildertoFactory(Function<InjectionTarget, Object> factory) Creates a binding with the given factory and adds it to the parent buildertoInstance(Object instance) Creates a binding with the given instance and adds it to the parent buildertoProvider(Supplier<Object> provider) Creates a binding with the given provider and adds it to the parent builder
-
Constructor Details
-
BindingBuilder
Creates a newBindingBuilder- Parameters:
matcher- The matcher to build frombuilder- The parent builder
-
-
Method Details
-
toInstance
-
toProvider
-
toFactory
Creates a binding with the given factory and adds it to the parent builder- Parameters:
factory- The instance to use- Returns:
- The parent builder, for method chaining
-
to
public B to(BiFunction<InjectionTarget, honeyroasted.jype.system.JTypeSystem, InjectionResult> factory) Creates a binding with the given factory and adds it to the parent builder- Parameters:
factory- The instance to use- Returns:
- The parent builder, for method chaining
-