1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.usagemodel.impl; |
7 | |
8 | import de.uka.ipd.sdq.pcm.usagemodel.*; |
9 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.EObject; |
11 | import org.eclipse.emf.ecore.EPackage; |
12 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
14 | |
15 | import de.uka.ipd.sdq.pcm.usagemodel.Branch; |
16 | import de.uka.ipd.sdq.pcm.usagemodel.BranchTransition; |
17 | import de.uka.ipd.sdq.pcm.usagemodel.ClosedWorkload; |
18 | import de.uka.ipd.sdq.pcm.usagemodel.Delay; |
19 | import de.uka.ipd.sdq.pcm.usagemodel.EntryLevelSystemCall; |
20 | import de.uka.ipd.sdq.pcm.usagemodel.Loop; |
21 | import de.uka.ipd.sdq.pcm.usagemodel.OpenWorkload; |
22 | import de.uka.ipd.sdq.pcm.usagemodel.ScenarioBehaviour; |
23 | import de.uka.ipd.sdq.pcm.usagemodel.Start; |
24 | import de.uka.ipd.sdq.pcm.usagemodel.Stop; |
25 | import de.uka.ipd.sdq.pcm.usagemodel.UsageModel; |
26 | import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario; |
27 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelFactory; |
28 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
29 | import de.uka.ipd.sdq.pcm.usagemodel.UserData; |
30 | |
31 | /** |
32 | * <!-- begin-user-doc --> |
33 | * An implementation of the model <b>Factory</b>. |
34 | * <!-- end-user-doc --> |
35 | * @generated |
36 | */ |
37 | public class UsagemodelFactoryImpl extends EFactoryImpl implements UsagemodelFactory { |
38 | /** |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @generated |
42 | */ |
43 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
44 | |
45 | /** |
46 | * Creates the default factory implementation. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public static UsagemodelFactory init() { |
52 | try { |
53 | UsagemodelFactory theUsagemodelFactory = (UsagemodelFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0"); |
54 | if (theUsagemodelFactory != null) { |
55 | return theUsagemodelFactory; |
56 | } |
57 | } |
58 | catch (Exception exception) { |
59 | EcorePlugin.INSTANCE.log(exception); |
60 | } |
61 | return new UsagemodelFactoryImpl(); |
62 | } |
63 | |
64 | /** |
65 | * Creates an instance of the factory. |
66 | * <!-- begin-user-doc --> |
67 | * <!-- end-user-doc --> |
68 | * @generated |
69 | */ |
70 | public UsagemodelFactoryImpl() { |
71 | super(); |
72 | } |
73 | |
74 | /** |
75 | * <!-- begin-user-doc --> |
76 | * <!-- end-user-doc --> |
77 | * @generated |
78 | */ |
79 | @Override |
80 | public EObject create(EClass eClass) { |
81 | switch (eClass.getClassifierID()) { |
82 | case UsagemodelPackage.USAGE_SCENARIO: return createUsageScenario(); |
83 | case UsagemodelPackage.USER_DATA: return createUserData(); |
84 | case UsagemodelPackage.USAGE_MODEL: return createUsageModel(); |
85 | case UsagemodelPackage.ENTRY_LEVEL_SYSTEM_CALL: return createEntryLevelSystemCall(); |
86 | case UsagemodelPackage.SCENARIO_BEHAVIOUR: return createScenarioBehaviour(); |
87 | case UsagemodelPackage.BRANCH_TRANSITION: return createBranchTransition(); |
88 | case UsagemodelPackage.BRANCH: return createBranch(); |
89 | case UsagemodelPackage.LOOP: return createLoop(); |
90 | case UsagemodelPackage.STOP: return createStop(); |
91 | case UsagemodelPackage.START: return createStart(); |
92 | case UsagemodelPackage.OPEN_WORKLOAD: return createOpenWorkload(); |
93 | case UsagemodelPackage.DELAY: return createDelay(); |
94 | case UsagemodelPackage.CLOSED_WORKLOAD: return createClosedWorkload(); |
95 | default: |
96 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
97 | } |
98 | } |
99 | |
100 | /** |
101 | * <!-- begin-user-doc --> |
102 | * <!-- end-user-doc --> |
103 | * @generated |
104 | */ |
105 | public UsageScenario createUsageScenario() { |
106 | UsageScenarioImpl usageScenario = new UsageScenarioImpl(); |
107 | return usageScenario; |
108 | } |
109 | |
110 | /** |
111 | * <!-- begin-user-doc --> |
112 | * <!-- end-user-doc --> |
113 | * @generated |
114 | */ |
115 | public ScenarioBehaviour createScenarioBehaviour() { |
116 | ScenarioBehaviourImpl scenarioBehaviour = new ScenarioBehaviourImpl(); |
117 | return scenarioBehaviour; |
118 | } |
119 | |
120 | /** |
121 | * <!-- begin-user-doc --> |
122 | * <!-- end-user-doc --> |
123 | * @generated |
124 | */ |
125 | public BranchTransition createBranchTransition() { |
126 | BranchTransitionImpl branchTransition = new BranchTransitionImpl(); |
127 | return branchTransition; |
128 | } |
129 | |
130 | /** |
131 | * <!-- begin-user-doc --> |
132 | * <!-- end-user-doc --> |
133 | * @generated |
134 | */ |
135 | public Branch createBranch() { |
136 | BranchImpl branch = new BranchImpl(); |
137 | return branch; |
138 | } |
139 | |
140 | /** |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public Loop createLoop() { |
146 | LoopImpl loop = new LoopImpl(); |
147 | return loop; |
148 | } |
149 | |
150 | /** |
151 | * <!-- begin-user-doc --> |
152 | * <!-- end-user-doc --> |
153 | * @generated |
154 | */ |
155 | public UsageModel createUsageModel() { |
156 | UsageModelImpl usageModel = new UsageModelImpl(); |
157 | return usageModel; |
158 | } |
159 | |
160 | /** |
161 | * <!-- begin-user-doc --> |
162 | * <!-- end-user-doc --> |
163 | * @generated |
164 | */ |
165 | public Stop createStop() { |
166 | StopImpl stop = new StopImpl(); |
167 | return stop; |
168 | } |
169 | |
170 | /** |
171 | * <!-- begin-user-doc --> |
172 | * <!-- end-user-doc --> |
173 | * @generated |
174 | */ |
175 | public Start createStart() { |
176 | StartImpl start = new StartImpl(); |
177 | return start; |
178 | } |
179 | |
180 | /** |
181 | * <!-- begin-user-doc --> |
182 | * <!-- end-user-doc --> |
183 | * @generated |
184 | */ |
185 | public OpenWorkload createOpenWorkload() { |
186 | OpenWorkloadImpl openWorkload = new OpenWorkloadImpl(); |
187 | return openWorkload; |
188 | } |
189 | |
190 | /** |
191 | * <!-- begin-user-doc --> |
192 | * <!-- end-user-doc --> |
193 | * @generated |
194 | */ |
195 | public EntryLevelSystemCall createEntryLevelSystemCall() { |
196 | EntryLevelSystemCallImpl entryLevelSystemCall = new EntryLevelSystemCallImpl(); |
197 | return entryLevelSystemCall; |
198 | } |
199 | |
200 | /** |
201 | * <!-- begin-user-doc --> |
202 | * <!-- end-user-doc --> |
203 | * @generated |
204 | */ |
205 | public ClosedWorkload createClosedWorkload() { |
206 | ClosedWorkloadImpl closedWorkload = new ClosedWorkloadImpl(); |
207 | return closedWorkload; |
208 | } |
209 | |
210 | /** |
211 | * <!-- begin-user-doc --> |
212 | * <!-- end-user-doc --> |
213 | * @generated |
214 | */ |
215 | public Delay createDelay() { |
216 | DelayImpl delay = new DelayImpl(); |
217 | return delay; |
218 | } |
219 | |
220 | /** |
221 | * <!-- begin-user-doc --> |
222 | * <!-- end-user-doc --> |
223 | * @generated |
224 | */ |
225 | public UserData createUserData() { |
226 | UserDataImpl userData = new UserDataImpl(); |
227 | return userData; |
228 | } |
229 | |
230 | /** |
231 | * <!-- begin-user-doc --> |
232 | * <!-- end-user-doc --> |
233 | * @generated |
234 | */ |
235 | public UsagemodelPackage getUsagemodelPackage() { |
236 | return (UsagemodelPackage)getEPackage(); |
237 | } |
238 | |
239 | /** |
240 | * <!-- begin-user-doc --> |
241 | * <!-- end-user-doc --> |
242 | * @deprecated |
243 | * @generated |
244 | */ |
245 | @Deprecated |
246 | public static UsagemodelPackage getPackage() { |
247 | return UsagemodelPackage.eINSTANCE; |
248 | } |
249 | |
250 | } //UsagemodelFactoryImpl |