1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package QVTBase.impl; |
8 | |
9 | import QVTBase.*; |
10 | |
11 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.EObject; |
13 | import org.eclipse.emf.ecore.EPackage; |
14 | |
15 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
16 | |
17 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model <b>Factory</b>. |
22 | * <!-- end-user-doc --> |
23 | * @generated |
24 | */ |
25 | public class QVTBaseFactoryImpl extends EFactoryImpl implements QVTBaseFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static QVTBaseFactory init() { |
33 | try { |
34 | QVTBaseFactory theQVTBaseFactory = (QVTBaseFactory)EPackage.Registry.INSTANCE.getEFactory("http://schema.omg.org/spec/QVT/1.0/qvtbase.xml"); |
35 | if (theQVTBaseFactory != null) { |
36 | return theQVTBaseFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new QVTBaseFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public QVTBaseFactoryImpl() { |
52 | super(); |
53 | } |
54 | |
55 | /** |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | @Override |
61 | public EObject create(EClass eClass) { |
62 | switch (eClass.getClassifierID()) { |
63 | case QVTBasePackage.FUNCTION: return createFunction(); |
64 | case QVTBasePackage.FUNCTION_PARAMETER: return createFunctionParameter(); |
65 | case QVTBasePackage.PATTERN: return createPattern(); |
66 | case QVTBasePackage.PREDICATE: return createPredicate(); |
67 | case QVTBasePackage.TRANSFORMATION: return createTransformation(); |
68 | case QVTBasePackage.TYPED_MODEL: return createTypedModel(); |
69 | default: |
70 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
71 | } |
72 | } |
73 | |
74 | /** |
75 | * <!-- begin-user-doc --> |
76 | * <!-- end-user-doc --> |
77 | * @generated |
78 | */ |
79 | public Function createFunction() { |
80 | FunctionImpl function = new FunctionImpl(); |
81 | return function; |
82 | } |
83 | |
84 | /** |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @generated |
88 | */ |
89 | public FunctionParameter createFunctionParameter() { |
90 | FunctionParameterImpl functionParameter = new FunctionParameterImpl(); |
91 | return functionParameter; |
92 | } |
93 | |
94 | /** |
95 | * <!-- begin-user-doc --> |
96 | * <!-- end-user-doc --> |
97 | * @generated |
98 | */ |
99 | public Pattern createPattern() { |
100 | PatternImpl pattern = new PatternImpl(); |
101 | return pattern; |
102 | } |
103 | |
104 | /** |
105 | * <!-- begin-user-doc --> |
106 | * <!-- end-user-doc --> |
107 | * @generated |
108 | */ |
109 | public Predicate createPredicate() { |
110 | PredicateImpl predicate = new PredicateImpl(); |
111 | return predicate; |
112 | } |
113 | |
114 | /** |
115 | * <!-- begin-user-doc --> |
116 | * <!-- end-user-doc --> |
117 | * @generated |
118 | */ |
119 | public Transformation createTransformation() { |
120 | TransformationImpl transformation = new TransformationImpl(); |
121 | return transformation; |
122 | } |
123 | |
124 | /** |
125 | * <!-- begin-user-doc --> |
126 | * <!-- end-user-doc --> |
127 | * @generated |
128 | */ |
129 | public TypedModel createTypedModel() { |
130 | TypedModelImpl typedModel = new TypedModelImpl(); |
131 | return typedModel; |
132 | } |
133 | |
134 | /** |
135 | * <!-- begin-user-doc --> |
136 | * <!-- end-user-doc --> |
137 | * @generated |
138 | */ |
139 | public QVTBasePackage getQVTBasePackage() { |
140 | return (QVTBasePackage)getEPackage(); |
141 | } |
142 | |
143 | /** |
144 | * <!-- begin-user-doc --> |
145 | * <!-- end-user-doc --> |
146 | * @deprecated |
147 | * @generated |
148 | */ |
149 | @Deprecated |
150 | public static QVTBasePackage getPackage() { |
151 | return QVTBasePackage.eINSTANCE; |
152 | } |
153 | |
154 | } //QVTBaseFactoryImpl |