All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.picocontainer.script.FooDecoratingPicoContainer Maven / Gradle / Ivy

package org.picocontainer.script;

import java.util.ArrayList;
import java.util.HashMap;

import junit.framework.Assert;

import org.picocontainer.MutablePicoContainer;
import org.picocontainer.Parameter;
import org.picocontainer.PicoCompositionException;
import org.picocontainer.containers.AbstractDelegatingMutablePicoContainer;

@SuppressWarnings("serial")
public class FooDecoratingPicoContainer extends AbstractDelegatingMutablePicoContainer {
    public FooDecoratingPicoContainer(MutablePicoContainer delegate) {
        super(delegate);
    }
    public MutablePicoContainer makeChildContainer() {
        return null;
    }

    public MutablePicoContainer addComponent(Object componentKey, Object componentImplementationOrInstance, Parameter... parameters) throws PicoCompositionException {
        Assert.assertEquals(HashMap.class, componentImplementationOrInstance);
        return super.addComponent(ArrayList.class, ArrayList.class, parameters);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy