KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > builder > DefaultJiceTypes


1 package org.jicengine.builder;
2 import java.util.*;
3
4 import org.jicengine.element.SimpleType;
5 import org.jicengine.element.Type;
6 import org.jicengine.element.impl.*;
7 /**
8  *
9  *
10  * <p>
11  * Copyright (C) 2004 Timo Laitinen
12  * </p>
13  *
14  * @author Timo Laitinen
15  * @created 2004-09-20
16  * @since JICE-0.10
17  *
18  */

19
20 public class DefaultJiceTypes {
21
22     private static Map types = new HashMap();
23     static {
24         types.put("array", ArrayElementCompiler.class);
25         types.put("list", ListElementCompiler.class);
26     types.put("collection", CollectionElementCompiler.class);
27         types.put("map", MapCompiler.class);
28
29         types.put("bean", BeanElementCompiler.class);
30         types.put("container", ContainerElementCompiler.class);
31         types.put("switch", SwitchCompiler.class);
32         types.put("factory", FactoryElementCompiler.class);
33         types.put("constant-of", ConstantOfElementCompiler.class);
34     types.put("cdata-converter", CdataConverterElementCompiler.class);
35     
36     // kept here for backwards compatibility (was used in JICE 2.1.1)
37
types.put("cdata-conversion", CdataConverterElementCompiler.class);
38     }
39   
40   private static Type defaultType = new SimpleType("bean",new String JavaDoc[0]);
41
42   public static Type getDefaultType()
43   {
44     return defaultType;
45   }
46   
47     public static TypeManager getTypeManager()
48     {
49         return new TypeManagerImpl(Collections.unmodifiableMap(types));
50     }
51 }
52
Popular Tags