Class InjectionProvider.InjectionType<T>

  • Type Parameters:
    T - type to inject
    Enclosing interface:
    InjectionProvider

    public static class InjectionProvider.InjectionType<T>
    extends Object
    A single type that can be injected.
    • Method Detail

      • create

        public static <T> InjectionProvider.InjectionType<T> create​(Class<T> type,
                                                                    InjectionProvider.CreateInstanceFunction<T> creator)
        Create an injection type for a type and associated function to create an instance.
        Type Parameters:
        T - type of the injectable
        Parameters:
        type - class that can be injected
        creator - function to create a new instance
        Returns:
        a new injection type
      • injectedType

        public Class<T> injectedType()
        Get the class of the injectable.
        Returns:
        class
      • createInstance

        public T createInstance​(OciRestApi ociRestApi,
                                Config vaultConfig)
        Create a new instance of the injectable.
        Parameters:
        ociRestApi - rest API to use
        vaultConfig - configuration of Vault (may be empty, never null)
        Returns:
        a new instance