Package org.picocontainer.containers

Examples of org.picocontainer.containers.TransientPicoContainer.addComponent()


    }

    public MutablePicoContainer build() {

        DefaultPicoContainer tempContainer = new TransientPicoContainer();
        tempContainer.addComponent(PicoContainer.class, parentContainer);

        addContainerComponents(tempContainer);

        ComponentFactory lastCaf = injectionType;
        while (!componentFactories.empty()) {
View Full Code Here


        ComponentFactory lastCaf = injectionType;
        while (!componentFactories.empty()) {
            lastCaf = buildComponentFactory(tempContainer, lastCaf);
        }

        tempContainer.addComponent(ComponentFactory.class, lastCaf);

        buildComponentMonitor(tempContainer);

        tempContainer.addComponent(LifecycleStrategy.class, lifecycleStrategyClass);
        tempContainer.addComponent("mpc", mpcClass);
View Full Code Here

        tempContainer.addComponent(ComponentFactory.class, lastCaf);

        buildComponentMonitor(tempContainer);

        tempContainer.addComponent(LifecycleStrategy.class, lifecycleStrategyClass);
        tempContainer.addComponent("mpc", mpcClass);

        MutablePicoContainer newContainer = (MutablePicoContainer) tempContainer.getComponent("mpc");

        addChildToParent(newContainer);
View Full Code Here

        tempContainer.addComponent(ComponentFactory.class, lastCaf);

        buildComponentMonitor(tempContainer);

        tempContainer.addComponent(LifecycleStrategy.class, lifecycleStrategyClass);
        tempContainer.addComponent("mpc", mpcClass);

        MutablePicoContainer newContainer = (MutablePicoContainer) tempContainer.getComponent("mpc");

        addChildToParent(newContainer);
        return newContainer;
View Full Code Here

    }

    private ComponentFactory buildComponentFactory(DefaultPicoContainer container, final ComponentFactory lastCaf) {
        Object componentFactory = componentFactories.pop();
        DefaultPicoContainer tmpContainer = new TransientPicoContainer(container);
        tmpContainer.addComponent("componentFactory", componentFactory);
        if (lastCaf != null) {
            tmpContainer.addComponent(ComponentFactory.class, lastCaf);
        }
        ComponentFactory newlastCaf = (ComponentFactory) tmpContainer.getComponent("componentFactory");
        if (newlastCaf instanceof BehaviorFactory) {
View Full Code Here

    private ComponentFactory buildComponentFactory(DefaultPicoContainer container, final ComponentFactory lastCaf) {
        Object componentFactory = componentFactories.pop();
        DefaultPicoContainer tmpContainer = new TransientPicoContainer(container);
        tmpContainer.addComponent("componentFactory", componentFactory);
        if (lastCaf != null) {
            tmpContainer.addComponent(ComponentFactory.class, lastCaf);
        }
        ComponentFactory newlastCaf = (ComponentFactory) tmpContainer.getComponent("componentFactory");
        if (newlastCaf instanceof BehaviorFactory) {
            ((BehaviorFactory) newlastCaf).wrap(lastCaf);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.