    001    package org.nanocontainer.script;
    002
    003    import org.picocontainer.MutablePicoContainer;
    004    import org.picocontainer.defaults.ComponentAdapterFactory;
    005
    006    import java.util.Map;
    007
    008    /**
    009     * @author Aslak Helles&oslash;y
    010     * @author Paul Hammant
    011     * @version $Revision: 2921 $
    012     */
    013    public class NullNodeBuilderDecorationDelegate implements NodeBuilderDecorationDelegate {
    014        public ComponentAdapterFactory decorate(ComponentAdapterFactory componentAdapterFactory, Map attributes) {
    015            return componentAdapterFactory;
    016        }
    017
    018        public MutablePicoContainer decorate(MutablePicoContainer picoContainer) {
    019            return picoContainer;
    020        }
    021
    022        public Object createNode(Object name, Map attributes, Object parentElement) {
    023            throw new NanoContainerMarkupException("Don't know how to create a '" + name + "' child of a '" + ((parentElement == null) ? "null" : parentElement.toString()) + "' element");
    024        }
    025
    026        public void rememberComponentKey(Map attributes) {
    027        }
    028    }