1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.impl; |
7 | |
8 | import de.uka.ipd.sdq.pcm.*; |
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.DummyClass; |
16 | import de.uka.ipd.sdq.pcm.PcmFactory; |
17 | import de.uka.ipd.sdq.pcm.PcmPackage; |
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 PcmFactoryImpl extends EFactoryImpl implements PcmFactory { |
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 PcmFactory init() { |
40 | try { |
41 | PcmFactory thePcmFactory = (PcmFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/4.0"); |
42 | if (thePcmFactory != null) { |
43 | return thePcmFactory; |
44 | } |
45 | } |
46 | catch (Exception exception) { |
47 | EcorePlugin.INSTANCE.log(exception); |
48 | } |
49 | return new PcmFactoryImpl(); |
50 | } |
51 | |
52 | /** |
53 | * Creates an instance of the factory. |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @generated |
57 | */ |
58 | public PcmFactoryImpl() { |
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 PcmPackage.DUMMY_CLASS: return createDummyClass(); |
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 DummyClass createDummyClass() { |
82 | DummyClassImpl dummyClass = new DummyClassImpl(); |
83 | return dummyClass; |
84 | } |
85 | |
86 | /** |
87 | * <!-- begin-user-doc --> |
88 | * <!-- end-user-doc --> |
89 | * @generated |
90 | */ |
91 | public PcmPackage getPcmPackage() { |
92 | return (PcmPackage)getEPackage(); |
93 | } |
94 | |
95 | /** |
96 | * <!-- begin-user-doc --> |
97 | * <!-- end-user-doc --> |
98 | * @deprecated |
99 | * @generated |
100 | */ |
101 | @Deprecated |
102 | public static PcmPackage getPackage() { |
103 | return PcmPackage.eINSTANCE; |
104 | } |
105 | |
106 | } //PcmFactoryImpl |