KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > mapping > impl > MappingFactoryImpl


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: MappingFactoryImpl.java,v 1.5 2005/06/08 06:21:43 nickb Exp $
16  */

17 package org.eclipse.emf.mapping.impl;
18
19
20 import org.eclipse.emf.ecore.EClass;
21 import org.eclipse.emf.ecore.EObject;
22 import org.eclipse.emf.ecore.impl.EFactoryImpl;
23 import org.eclipse.emf.mapping.*;
24
25
26 /**
27  * <!-- begin-user-doc -->
28  * An implementation of the model <b>Factory</b>.
29  * <!-- end-user-doc -->
30  * @generated
31  */

32 public class MappingFactoryImpl extends EFactoryImpl implements MappingFactory
33 {
34   /**
35    * Creates an instance of the factory.
36    * <!-- begin-user-doc -->
37    * <!-- end-user-doc -->
38    * @generated
39    */

40   public MappingFactoryImpl()
41   {
42     super();
43   }
44
45   /**
46    * <!-- begin-user-doc -->
47    * <!-- end-user-doc -->
48    * @generated
49    */

50   public EObject create(EClass eClass)
51   {
52     switch (eClass.getClassifierID())
53     {
54       case MappingPackage.MAPPING_HELPER: return createMappingHelper();
55       case MappingPackage.MAPPING: return createMapping();
56       case MappingPackage.TYPE_CONVERTER: return createTypeConverter();
57       case MappingPackage.FUNCTION_PAIR: return createFunctionPair();
58       case MappingPackage.FUNCTION_NAME_PAIR: return createFunctionNamePair();
59       case MappingPackage.MAPPING_STRATEGY: return createMappingStrategy();
60       case MappingPackage.MAPPING_ROOT: return createMappingRoot();
61       case MappingPackage.COMPLEX_TYPE_CONVERTER: return createComplexTypeConverter();
62       default:
63         throw new IllegalArgumentException JavaDoc("The class '" + eClass.getName() + "' is not a valid classifier");
64     }
65   }
66
67   /**
68    * <!-- begin-user-doc -->
69    * <!-- end-user-doc -->
70    * @generated
71    */

72   public MappingHelper createMappingHelper()
73   {
74     MappingHelperImpl mappingHelper = new MappingHelperImpl();
75     return mappingHelper;
76   }
77
78   /**
79    * <!-- begin-user-doc -->
80    * <!-- end-user-doc -->
81    * @generated
82    */

83   public Mapping createMapping()
84   {
85     MappingImpl mapping = new MappingImpl();
86     return mapping;
87   }
88
89   /**
90    * <!-- begin-user-doc -->
91    * <!-- end-user-doc -->
92    * @generated
93    */

94   public TypeConverter createTypeConverter()
95   {
96     TypeConverterImpl typeConverter = new TypeConverterImpl();
97     return typeConverter;
98   }
99
100   /**
101    * <!-- begin-user-doc -->
102    * <!-- end-user-doc -->
103    * @generated
104    */

105   public FunctionPair createFunctionPair()
106   {
107     FunctionPairImpl functionPair = new FunctionPairImpl();
108     return functionPair;
109   }
110
111   /**
112    * <!-- begin-user-doc -->
113    * <!-- end-user-doc -->
114    * @generated
115    */

116   public FunctionNamePair createFunctionNamePair()
117   {
118     FunctionNamePairImpl functionNamePair = new FunctionNamePairImpl();
119     return functionNamePair;
120   }
121
122   /**
123    * <!-- begin-user-doc -->
124    * <!-- end-user-doc -->
125    * @generated
126    */

127   public MappingStrategy createMappingStrategy()
128   {
129     MappingStrategyImpl mappingStrategy = new MappingStrategyImpl();
130     return mappingStrategy;
131   }
132
133   /**
134    * <!-- begin-user-doc -->
135    * <!-- end-user-doc -->
136    * @generated
137    */

138   public MappingRoot createMappingRoot()
139   {
140     MappingRootImpl mappingRoot = new MappingRootImpl();
141     return mappingRoot;
142   }
143
144   /**
145    * <!-- begin-user-doc -->
146    * <!-- end-user-doc -->
147    * @generated
148    */

149   public ComplexTypeConverter createComplexTypeConverter()
150   {
151     ComplexTypeConverterImpl complexTypeConverter = new ComplexTypeConverterImpl();
152     return complexTypeConverter;
153   }
154
155   /**
156    * <!-- begin-user-doc -->
157    * <!-- end-user-doc -->
158    * @generated
159    */

160   public MappingPackage getMappingPackage()
161   {
162     return (MappingPackage)getEPackage();
163   }
164
165   /**
166    * <!-- begin-user-doc -->
167    * <!-- end-user-doc -->
168    * @deprecated
169    * @generated
170    */

171   public static MappingPackage getPackage()
172   {
173     return MappingPackage.eINSTANCE;
174   }
175
176 } //MappingFactoryImpl
177

178
179
Popular Tags