001 /*******************************************************************************
002 * Copyright (C) PicoContainer Organization. All rights reserved.
003 * ---------------------------------------------------------------------------
004 * The software in this package is published under the terms of the BSD style
005 * license a copy of which has been included with this distribution in the
006 * LICENSE.txt file.
007 ******************************************************************************/
008 package org.picocontainer.script;
009
010 import org.picocontainer.MutablePicoContainer;
011 import org.picocontainer.ComponentFactory;
012
013 import java.util.Map;
014
015 /**
016 * NodeBuilderDecorators allows to dynamically extend node-based builder syntax,
017 * such as <a href="http://picocontainer.org/script/javadoc/groovy/org/picocontainer/script/groovy/GroovyNodeBuilder.html">GroovyNodeBuilder</a>.
018 *
019 * @author Paul Hammant
020 * @author Aslak Hellesøy
021 */
022 @SuppressWarnings("unchecked")
023 public interface NodeBuilderDecorator {
024
025 ComponentFactory decorate(ComponentFactory componentFactory, Map attributes);
026
027 MutablePicoContainer decorate(MutablePicoContainer picoContainer);
028
029 Object createNode(Object name, Map attributes, Object parentElement);
030
031 void rememberComponentKey(Map attributes);
032
033 }