1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.GDoF.impl; |
8 | |
9 | import de.uka.ipd.sdq.pcm.designdecision.GDoF.*; |
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 GDoFFactoryImpl extends EFactoryImpl implements GDoFFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static GDoFFactory init() { |
33 | try { |
34 | GDoFFactory theGDoFFactory = (GDoFFactory)EPackage.Registry.INSTANCE.getEFactory("http:///DesignDecision/GDoF.ecore"); |
35 | if (theGDoFFactory != null) { |
36 | return theGDoFFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new GDoFFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public GDoFFactoryImpl() { |
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 GDoFPackage.CHANGEABLE_ELEMENT_DESCRIPTION: return createChangeableElementDescription(); |
64 | case GDoFPackage.VALUE_RULE: return createValueRule(); |
65 | case GDoFPackage.OCL_RULE: return createOCLRule(); |
66 | case GDoFPackage.HELPER_OCL_DEFINITION: return createHelperOCLDefinition(); |
67 | case GDoFPackage.DO_FREPOSITORY: return createDoFRepository(); |
68 | case GDoFPackage.INSTANCE_SELECTION_RULE: return createInstanceSelectionRule(); |
69 | case GDoFPackage.STATIC_SELECTION_RULE: return createStaticSelectionRule(); |
70 | case GDoFPackage.DEGREE_OF_FREEDOM: return createDegreeOfFreedom(); |
71 | default: |
72 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
73 | } |
74 | } |
75 | |
76 | /** |
77 | * <!-- begin-user-doc --> |
78 | * <!-- end-user-doc --> |
79 | * @generated |
80 | */ |
81 | public ChangeableElementDescription createChangeableElementDescription() { |
82 | ChangeableElementDescriptionImpl changeableElementDescription = new ChangeableElementDescriptionImpl(); |
83 | return changeableElementDescription; |
84 | } |
85 | |
86 | /** |
87 | * <!-- begin-user-doc --> |
88 | * <!-- end-user-doc --> |
89 | * @generated |
90 | */ |
91 | public ValueRule createValueRule() { |
92 | ValueRuleImpl valueRule = new ValueRuleImpl(); |
93 | return valueRule; |
94 | } |
95 | |
96 | /** |
97 | * <!-- begin-user-doc --> |
98 | * <!-- end-user-doc --> |
99 | * @generated |
100 | */ |
101 | public OCLRule createOCLRule() { |
102 | OCLRuleImpl oclRule = new OCLRuleImpl(); |
103 | return oclRule; |
104 | } |
105 | |
106 | /** |
107 | * <!-- begin-user-doc --> |
108 | * <!-- end-user-doc --> |
109 | * @generated |
110 | */ |
111 | public HelperOCLDefinition createHelperOCLDefinition() { |
112 | HelperOCLDefinitionImpl helperOCLDefinition = new HelperOCLDefinitionImpl(); |
113 | return helperOCLDefinition; |
114 | } |
115 | |
116 | /** |
117 | * <!-- begin-user-doc --> |
118 | * <!-- end-user-doc --> |
119 | * @generated |
120 | */ |
121 | public DoFRepository createDoFRepository() { |
122 | DoFRepositoryImpl doFRepository = new DoFRepositoryImpl(); |
123 | return doFRepository; |
124 | } |
125 | |
126 | /** |
127 | * <!-- begin-user-doc --> |
128 | * <!-- end-user-doc --> |
129 | * @generated |
130 | */ |
131 | public InstanceSelectionRule createInstanceSelectionRule() { |
132 | InstanceSelectionRuleImpl instanceSelectionRule = new InstanceSelectionRuleImpl(); |
133 | return instanceSelectionRule; |
134 | } |
135 | |
136 | /** |
137 | * <!-- begin-user-doc --> |
138 | * <!-- end-user-doc --> |
139 | * @generated |
140 | */ |
141 | public StaticSelectionRule createStaticSelectionRule() { |
142 | StaticSelectionRuleImpl staticSelectionRule = new StaticSelectionRuleImpl(); |
143 | return staticSelectionRule; |
144 | } |
145 | |
146 | /** |
147 | * <!-- begin-user-doc --> |
148 | * <!-- end-user-doc --> |
149 | * @generated |
150 | */ |
151 | public DegreeOfFreedom createDegreeOfFreedom() { |
152 | DegreeOfFreedomImpl degreeOfFreedom = new DegreeOfFreedomImpl(); |
153 | return degreeOfFreedom; |
154 | } |
155 | |
156 | /** |
157 | * <!-- begin-user-doc --> |
158 | * <!-- end-user-doc --> |
159 | * @generated |
160 | */ |
161 | public GDoFPackage getGDoFPackage() { |
162 | return (GDoFPackage)getEPackage(); |
163 | } |
164 | |
165 | /** |
166 | * <!-- begin-user-doc --> |
167 | * <!-- end-user-doc --> |
168 | * @deprecated |
169 | * @generated |
170 | */ |
171 | @Deprecated |
172 | public static GDoFPackage getPackage() { |
173 | return GDoFPackage.eINSTANCE; |
174 | } |
175 | |
176 | } //GDoFFactoryImpl |