1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.subsystem.impl; |
7 | |
8 | import de.uka.ipd.sdq.pcm.subsystem.*; |
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.subsystem.SubSystem; |
16 | import de.uka.ipd.sdq.pcm.subsystem.SubsystemFactory; |
17 | import de.uka.ipd.sdq.pcm.subsystem.SubsystemPackage; |
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 SubsystemFactoryImpl extends EFactoryImpl implements SubsystemFactory { |
26 | /** |
27 | * <!-- begin-user-doc --> |
28 | * <!-- end-user-doc --> |
29 | * @generated |
30 | */ |
31 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
32 | |
33 | /** |
34 | * Creates the default factory implementation. |
35 | * <!-- begin-user-doc --> |
36 | * <!-- end-user-doc --> |
37 | * @generated |
38 | */ |
39 | public static SubsystemFactory init() { |
40 | try { |
41 | SubsystemFactory theSubsystemFactory = (SubsystemFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/SubSystem/4.0"); |
42 | if (theSubsystemFactory != null) { |
43 | return theSubsystemFactory; |
44 | } |
45 | } |
46 | catch (Exception exception) { |
47 | EcorePlugin.INSTANCE.log(exception); |
48 | } |
49 | return new SubsystemFactoryImpl(); |
50 | } |
51 | |
52 | /** |
53 | * Creates an instance of the factory. |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @generated |
57 | */ |
58 | public SubsystemFactoryImpl() { |
59 | super(); |
60 | } |
61 | |
62 | /** |
63 | * <!-- begin-user-doc --> |
64 | * <!-- end-user-doc --> |
65 | * @generated |
66 | */ |
67 | @Override |
68 | public EObject create(EClass eClass) { |
69 | switch (eClass.getClassifierID()) { |
70 | case SubsystemPackage.SUB_SYSTEM: return createSubSystem(); |
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 SubSystem createSubSystem() { |
82 | SubSystemImpl subSystem = new SubSystemImpl(); |
83 | return subSystem; |
84 | } |
85 | |
86 | /** |
87 | * <!-- begin-user-doc --> |
88 | * <!-- end-user-doc --> |
89 | * @generated |
90 | */ |
91 | public SubsystemPackage getSubsystemPackage() { |
92 | return (SubsystemPackage)getEPackage(); |
93 | } |
94 | |
95 | /** |
96 | * <!-- begin-user-doc --> |
97 | * <!-- end-user-doc --> |
98 | * @deprecated |
99 | * @generated |
100 | */ |
101 | @Deprecated |
102 | public static SubsystemPackage getPackage() { |
103 | return SubsystemPackage.eINSTANCE; |
104 | } |
105 | |
106 | } //SubsystemFactoryImpl |