01: /*
02: * @(#)NodeEditingConfiguration.java 1.2 04/12/06
03: *
04: * Copyright (c) 2003, 2004 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.xml;
10:
11: import pnuts.lang.Context;
12: import pnuts.lang.PnutsFunction;
13: import pnuts.lang.Configuration;
14: import org.pnuts.xml.element;
15: import java.util.*;
16:
17: public class NodeEditingConfiguration extends XMLConfiguration {
18:
19: final static PnutsFunction elementFunc = new element();
20:
21: public NodeEditingConfiguration() {
22: }
23:
24: public NodeEditingConfiguration(Configuration base) {
25: super (base);
26: }
27:
28: public Object handleUndefinedSymbol(String symbol, Context context) {
29: return elementFunc.call(new Object[] { symbol }, context);
30: }
31:
32: public Map createMap(int size, Context context) {
33: return new LinkedHashMap(size);
34: }
35: }
|