-
public final class DependencyProvider<T extends Object>A generic class used for lazy dependency injection, ensuring that dependencies are initialized only when they are accessed. This approach helps in deferring the initialization cost until the dependency is actually needed, which can be particularly useful for heavy resources or services.
-
-
Constructor Summary
Constructors Constructor Description DependencyProvider(Function0<T> instanceGenerator)Creates a DependencyProvider with the specified lambda for lazy generation of the dependency.
-
Method Summary
-
-
Constructor Detail
-
DependencyProvider
DependencyProvider(Function0<T> instanceGenerator)
Creates a DependencyProvider with the specified lambda for lazy generation of the dependency.
-
-
-
-