Class ConstructorInjector<T>

    • Constructor Detail

      • ConstructorInjector

        public ConstructorInjector​(java.lang.Object componentKey,
                                   java.lang.Class<?> componentImplementation,
                                   Parameter... parameters)
        Constructor injector that uses no monitor and no lifecycle adapter. This is a more convenient constructor for use when instantiating a constructor injector directly.
        Parameters:
        componentKey - the search key for this implementation
        componentImplementation - the concrete implementation
        parameters - the parameters used for initialization
      • ConstructorInjector

        public ConstructorInjector​(java.lang.Object componentKey,
                                   java.lang.Class componentImplementation,
                                   Parameter[] parameters,
                                   ComponentMonitor monitor,
                                   boolean useNames)
                            throws AbstractInjector.NotConcreteRegistrationException
        Creates a ConstructorInjector
        Parameters:
        componentKey - the search key for this implementation
        componentImplementation - the concrete implementation
        parameters - the parameters to use for the initialization
        monitor - the component monitor used by this addAdapter
        useNames - use argument names when looking up dependencies
        Throws:
        AbstractInjector.NotConcreteRegistrationException - if the implementation is not a concrete class.
        java.lang.NullPointerException - if one of the parameters is null
      • ConstructorInjector

        public ConstructorInjector​(java.lang.Object componentKey,
                                   java.lang.Class componentImplementation,
                                   Parameter[] parameters,
                                   ComponentMonitor monitor,
                                   boolean useNames,
                                   boolean rememberChosenCtor)
                            throws AbstractInjector.NotConcreteRegistrationException
        Creates a ConstructorInjector
        Parameters:
        componentKey - the search key for this implementation
        componentImplementation - the concrete implementation
        parameters - the parameters to use for the initialization
        monitor - the component monitor used by this addAdapter
        useNames - use argument names when looking up dependencies
        rememberChosenCtor - remember the chosen constructor (to speed up second/subsequent calls)
        Throws:
        AbstractInjector.NotConcreteRegistrationException - if the implementation is not a concrete class.
        java.lang.NullPointerException - if one of the parameters is null