Package io.activej.inject
Interface InstanceProvider<T>
- All Known Implementing Classes:
Preprocessor.InstanceProviderImpl
public interface InstanceProvider<T>
A provider, unlike other DI frameworks, is just a version of
Injector.getInstance(io.activej.inject.Key<T>) with a baked in key.
If you need a function that returns a new object each time then you need to make your binding transient.
The main reason for its existence is that it can be fluently requested by provider methods etc.
Also, it can be used for lazy dependency cycle resolution.
-
Method Summary
-
Method Details
-
key
-
get
T get()
-