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

    Modifier and Type
    Method
    Description
    Returns the injection value for the given key.
  • 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, null is 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
      1. If the key is an InjectionKey<T>, the value must be of the type T
      2. If the key is a Class, the value must be of that class.