// Path: src/main/java/com/jenkov/container/itf/factory/IGlobalFactory.java
// public interface IGlobalFactory<T> {
// 
//     public Class getReturnType();
// 
// 
//     /**
//      * Returns an instance of whatever component this global factory produces
//      *
//      * @param parameters Any parameters needed by the factory to create its instance.
//      * @return The object instance as created by the facttory.
//      */
//     public T instance(Object ... parameters);
// 
//     /**
//      * This method is called by the container when executing a phase in a factory that supports life cycle phases.
//      * The container knows nothing about local products, therefore this method is called. Only the concrete
//      * factory knows about cached local products (if any).
//      *
//      * <br/><br/>
//      * This is the method a global factory will override when implementing life cycle phase behaviour, e.g. for
//      * cached objects.
//      *
//      * @param phase       The name of the phase to execute. For instance, "config" or "dispose".
//      * @param parameters  The parameters passed to the container when the phase begins. For instance to
//      *                    an instance() method call, or an execPhase(phase, factory, parameters) call.
//      * @return            Null, or the local products the phase ends up being executed on. If executed
//      *                    for several local product arrays (e.g. in pools or flyweights), null will be returned, since it does not
//      *                    make sense to return anything. Returning anything would only make sense for
//      *                    the "create" phase, but currently this phase does not use the execPhase() method
//      *                    to carry out its work. It uses the factory.instance() methods instead.
//      */
//     public Object[] execPhase(String phase, Object ... parameters);
// 
// 
// }
// 
// Path: src/main/java/com/jenkov/container/itf/factory/ILocalFactory.java
// public interface ILocalFactory {
// 
//      public Class getReturnType();
// 
//     /**
//      * This method is intended to be called *internally between* factories when creating
//      * an instance of some class. It is not intended to be called directly by client code,
//      * or from the Container. For that purpose use the instance(Object ... parameters)
//      * method. If you do call this method directly, a null will suffice for the localProducts
//      * array.
//      *
//      * NOTE: Only called on local factories. Never on global factories.
//      *
//      * <br/><br/>
//      * If you develop a custom IFactory implementation you should
//      * extend LocalFactoryBase and override this method, not the instance(Object ... parameters)
//      * method. If your factory implementation calls any other factories it should pass on
//      * both the parameters and localProducts object arrays!!
//      * ... as in factory.instance(parameters, localProducts); .
//      *  Do not just call the instance() or instance(parameters) method.
//      *
//      * @param parameters
//      * @param localProducts
//      * @return The created object.
//      */
//     public Object instance(Object[] parameters, Object[] localProducts);
// }


import com.jenkov.container.itf.factory.IGlobalFactory;
import com.jenkov.container.itf.factory.ILocalFactory;
import java.util.List;
package com.jenkov.container.impl.factory;



/**

 */
public class InputAdaptingFactory extends LocalFactoryBase implements ILocalFactory {

    IGlobalFactory targetFactory = null;
    List<ILocalFactory> inputFactories = null;

// Path: src/main/java/com/jenkov/container/itf/factory/IGlobalFactory.java
// public interface IGlobalFactory<T> {
// 
//     public Class getReturnType();
// 
// 
//     /**
//      * Returns an instance of whatever component this global factory produces
//      *
//      * @param parameters Any parameters needed by the factory to create its instance.
//      * @return The object instance as created by the facttory.
//      */
//     public T instance(Object ... parameters);
// 
//     /**
//      * This method is called by the container when executing a phase in a factory that supports life cycle phases.
//      * The container knows nothing about local products, therefore this method is called. Only the concrete
//      * factory knows about cached local products (if any).
//      *
//      * <br/><br/>
//      * This is the method a global factory will override when implementing life cycle phase behaviour, e.g. for
//      * cached objects.
//      *
//      * @param phase       The name of the phase to execute. For instance, "config" or "dispose".
//      * @param parameters  The parameters passed to the container when the phase begins. For instance to
//      *                    an instance() method call, or an execPhase(phase, factory, parameters) call.
//      * @return            Null, or the local products the phase ends up being executed on. If executed
//      *                    for several local product arrays (e.g. in pools or flyweights), null will be returned, since it does not
//      *                    make sense to return anything. Returning anything would only make sense for
//      *                    the "create" phase, but currently this phase does not use the execPhase() method
//      *                    to carry out its work. It uses the factory.instance() methods instead.
//      */
//     public Object[] execPhase(String phase, Object ... parameters);
// 
// 
// }
// 
// Path: src/main/java/com/jenkov/container/itf/factory/ILocalFactory.java
// public interface ILocalFactory {
// 
//      public Class getReturnType();
// 
//     /**
//      * This method is intended to be called *internally between* factories when creating
//      * an instance of some class. It is not intended to be called directly by client code,
//      * or from the Container. For that purpose use the instance(Object ... parameters)
//      * method. If you do call this method directly, a null will suffice for the localProducts
//      * array.
//      *
//      * NOTE: Only called on local factories. Never on global factories.
//      *
//      * <br/><br/>
//      * If you develop a custom IFactory implementation you should
//      * extend LocalFactoryBase and override this method, not the instance(Object ... parameters)
//      * method. If your factory implementation calls any other factories it should pass on
//      * both the parameters and localProducts object arrays!!
//      * ... as in factory.instance(parameters, localProducts); .
//      *  Do not just call the instance() or instance(parameters) method.
//      *
//      * @param parameters
//      * @param localProducts
//      * @return The created object.
//      */
//     public Object instance(Object[] parameters, Object[] localProducts);
// }


// Path: src/main/java/com/jenkov/container/impl/factory/InputAdaptingFactory.java
import com.jenkov.container.itf.factory.IGlobalFactory;
import com.jenkov.container.itf.factory.ILocalFactory;
import java.util.List;

package com.jenkov.container.impl.factory;



/**

 */
public class InputAdaptingFactory extends LocalFactoryBase implements ILocalFactory {

    IGlobalFactory targetFactory = null;
    List<ILocalFactory> inputFactories = null;

    public InputAdaptingFactory(IGlobalFactory targetFactory, List<ILocalFactory> inputFactories) {