KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > script > NullNodeBuilderDecorationDelegate


1 package org.nanocontainer.script;
2
3 import org.picocontainer.MutablePicoContainer;
4 import org.picocontainer.defaults.ComponentAdapterFactory;
5
6 import java.util.Map JavaDoc;
7
8 /**
9  * @author Aslak Hellesøy
10  * @author Paul Hammant
11  * @version $Revision: 2921 $
12  */

13 public class NullNodeBuilderDecorationDelegate implements NodeBuilderDecorationDelegate {
14     public ComponentAdapterFactory decorate(ComponentAdapterFactory componentAdapterFactory, Map JavaDoc attributes) {
15         return componentAdapterFactory;
16     }
17
18     public MutablePicoContainer decorate(MutablePicoContainer picoContainer) {
19         return picoContainer;
20     }
21
22     public Object JavaDoc createNode(Object JavaDoc name, Map JavaDoc attributes, Object JavaDoc parentElement) {
23         throw new NanoContainerMarkupException("Don't know how to create a '" + name + "' child of a '" + ((parentElement == null) ? "null" : parentElement.toString()) + "' element");
24     }
25
26     public void rememberComponentKey(Map JavaDoc attributes) {
27     }
28 }
29
Popular Tags