Class DI.ScopedBindingBuilder<T>
java.lang.Object
org.apache.logging.log4j.plugins.di.DI.UnscopedBindingBuilder<T>
org.apache.logging.log4j.plugins.di.DI.ScopedBindingBuilder<T>
- Type Parameters:
T
- type of binding result being registered
- Enclosing class:
- DI
Builder DSL for configuring a scoped binding to be registered with a
ConfigurableInstanceFactory
.-
Method Summary
Modifier and TypeMethodDescriptiontoProvider
(Supplier<? extends T> provider) Adds a scoped binding to the given provider function.Methods inherited from class org.apache.logging.log4j.plugins.di.DI.UnscopedBindingBuilder
inScope, toFunction, toInstance, toSingleton, toUnscoped
-
Method Details
-
toProvider
Adds a scoped binding to the given provider function. If noScope
can be found corresponding to the requested scope annotation type, then this provider will be registered as an unscoped binding.- Parameters:
provider
- unscoped function for creating the binding value- Returns:
- builder DSL for ConfigurableInstanceFactory
-