001 /*****************************************************************************
002 * Copyright (C) NanoContainer Organization. All rights reserved. *
003 * ------------------------------------------------------------------------- *
004 * The software in this package is published under the terms of the BSD *
005 * style license a copy of which has been included with this distribution in *
006 * the LICENSE.txt file. *
007 * *
008 * Original code by Paul Hammant and Aslak Hellesøy *
009 *****************************************************************************/
010
011 package org.nanocontainer.script;
012
013 import org.picocontainer.MutablePicoContainer;
014 import org.picocontainer.defaults.ComponentAdapterFactory;
015
016 import java.util.Map;
017
018 /**
019 * Implementors of this class can be passed to {@link org.nanocontainer.script.groovy.OldGroovyNodeBuilder}'s constructor
020 * to dynamically extend the core builder syntax.
021 *
022 * Note: Although this interface is currently only used by the Groovy {@link org.nanocontainer.script.groovy.OldGroovyNodeBuilder}
023 * class, there is nothing groovy going on here - nor in the AOP subclass {@link org.nanocontainer.aop.defaults.AopNodeBuilderDecorationDelegate}
024 * class. In other words, it should be easy to add AOP capabilities to the other scripting engines such as the XML ones.
025 *
026 * @author Paul Hammant
027 * @author Aslak Hellesøy
028 * @version $Revision: 2863 $
029 */
030 public interface NodeBuilderDecorationDelegate {
031
032 ComponentAdapterFactory decorate(ComponentAdapterFactory componentAdapterFactory, Map attributes);
033
034 MutablePicoContainer decorate(MutablePicoContainer picoContainer);
035
036 Object createNode(Object name, Map attributes, Object parentElement);
037
038 void rememberComponentKey(Map attributes);
039 }