1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.system.impl; |
7 | |
8 | import org.eclipse.emf.ecore.EClass; |
9 | import org.eclipse.emf.ecore.EObject; |
10 | import org.eclipse.emf.ecore.EPackage; |
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
12 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
13 | |
14 | import de.uka.ipd.sdq.pcm.system.SystemFactory; |
15 | import de.uka.ipd.sdq.pcm.system.SystemPackage; |
16 | |
17 | /** |
18 | * <!-- begin-user-doc --> |
19 | * An implementation of the model <b>Factory</b>. |
20 | * <!-- end-user-doc --> |
21 | * @generated |
22 | */ |
23 | public class SystemFactoryImpl extends EFactoryImpl implements SystemFactory { |
24 | /** |
25 | * <!-- begin-user-doc --> |
26 | * <!-- end-user-doc --> |
27 | * @generated |
28 | */ |
29 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
30 | |
31 | /** |
32 | * Creates the default factory implementation. |
33 | * <!-- begin-user-doc --> |
34 | * <!-- end-user-doc --> |
35 | * @generated |
36 | */ |
37 | public static SystemFactory init() { |
38 | try { |
39 | SystemFactory theSystemFactory = (SystemFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/System/4.0"); |
40 | if (theSystemFactory != null) { |
41 | return theSystemFactory; |
42 | } |
43 | } |
44 | catch (Exception exception) { |
45 | EcorePlugin.INSTANCE.log(exception); |
46 | } |
47 | return new SystemFactoryImpl(); |
48 | } |
49 | |
50 | /** |
51 | * Creates an instance of the factory. |
52 | * <!-- begin-user-doc --> |
53 | * <!-- end-user-doc --> |
54 | * @generated |
55 | */ |
56 | public SystemFactoryImpl() { |
57 | super(); |
58 | } |
59 | |
60 | /** |
61 | * <!-- begin-user-doc --> |
62 | * <!-- end-user-doc --> |
63 | * @generated |
64 | */ |
65 | @Override |
66 | public EObject create(EClass eClass) { |
67 | switch (eClass.getClassifierID()) { |
68 | case SystemPackage.SYSTEM: return createSystem(); |
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 de.uka.ipd.sdq.pcm.system.System createSystem() { |
80 | SystemImpl system = new SystemImpl(); |
81 | return system; |
82 | } |
83 | |
84 | /** |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @generated |
88 | */ |
89 | public SystemPackage getSystemPackage() { |
90 | return (SystemPackage)getEPackage(); |
91 | } |
92 | |
93 | /** |
94 | * <!-- begin-user-doc --> |
95 | * <!-- end-user-doc --> |
96 | * @deprecated |
97 | * @generated |
98 | */ |
99 | @Deprecated |
100 | public static SystemPackage getPackage() { |
101 | return SystemPackage.eINSTANCE; |
102 | } |
103 | |
104 | } //SystemFactoryImpl |