Interface InjectionProviderFunction
public interface InjectionProviderFunction
A function that provides an injection value for a given key.
This is used to provide injection values based on custom logic.
- Since:
- 1.9
-
Method Summary
-
Method Details
-
get
Returns the injection value for the given key.- Parameters:
key- The key.- Returns:
- The injection value.
If this provider does provide an injection value for the specified key,
nullis returned. - Implementation Requirements:
- The key type and the return type are Object, because this method should be able to handle different types of injection keys.
Note that some types of injection keys may have special requirements for the returned injection value. For example
- If the key is an
InjectionKey<T>, the value must be of the type T - If the key is a
Class, the value must be of that class.
- If the key is an
-