1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.resourcetype.impl; |
7 | |
8 | import de.uka.ipd.sdq.pcm.resourcetype.*; |
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.resourcetype.CommunicationLinkResourceType; |
16 | import de.uka.ipd.sdq.pcm.resourcetype.ProcessingResourceType; |
17 | import de.uka.ipd.sdq.pcm.resourcetype.ResourceInterface; |
18 | import de.uka.ipd.sdq.pcm.resourcetype.ResourceRepository; |
19 | import de.uka.ipd.sdq.pcm.resourcetype.ResourceSignature; |
20 | import de.uka.ipd.sdq.pcm.resourcetype.ResourcetypeFactory; |
21 | import de.uka.ipd.sdq.pcm.resourcetype.ResourcetypePackage; |
22 | |
23 | /** |
24 | * <!-- begin-user-doc --> |
25 | * An implementation of the model <b>Factory</b>. |
26 | * <!-- end-user-doc --> |
27 | * @generated |
28 | */ |
29 | public class ResourcetypeFactoryImpl extends EFactoryImpl implements ResourcetypeFactory { |
30 | /** |
31 | * <!-- begin-user-doc --> |
32 | * <!-- end-user-doc --> |
33 | * @generated |
34 | */ |
35 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
36 | |
37 | /** |
38 | * Creates the default factory implementation. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @generated |
42 | */ |
43 | public static ResourcetypeFactory init() { |
44 | try { |
45 | ResourcetypeFactory theResourcetypeFactory = (ResourcetypeFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/ResourceType/4.0"); |
46 | if (theResourcetypeFactory != null) { |
47 | return theResourcetypeFactory; |
48 | } |
49 | } |
50 | catch (Exception exception) { |
51 | EcorePlugin.INSTANCE.log(exception); |
52 | } |
53 | return new ResourcetypeFactoryImpl(); |
54 | } |
55 | |
56 | /** |
57 | * Creates an instance of the factory. |
58 | * <!-- begin-user-doc --> |
59 | * <!-- end-user-doc --> |
60 | * @generated |
61 | */ |
62 | public ResourcetypeFactoryImpl() { |
63 | super(); |
64 | } |
65 | |
66 | /** |
67 | * <!-- begin-user-doc --> |
68 | * <!-- end-user-doc --> |
69 | * @generated |
70 | */ |
71 | @Override |
72 | public EObject create(EClass eClass) { |
73 | switch (eClass.getClassifierID()) { |
74 | case ResourcetypePackage.RESOURCE_SIGNATURE: return createResourceSignature(); |
75 | case ResourcetypePackage.PROCESSING_RESOURCE_TYPE: return createProcessingResourceType(); |
76 | case ResourcetypePackage.RESOURCE_REPOSITORY: return createResourceRepository(); |
77 | case ResourcetypePackage.COMMUNICATION_LINK_RESOURCE_TYPE: return createCommunicationLinkResourceType(); |
78 | case ResourcetypePackage.RESOURCE_INTERFACE: return createResourceInterface(); |
79 | default: |
80 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
81 | } |
82 | } |
83 | |
84 | /** |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @generated |
88 | */ |
89 | public ResourceSignature createResourceSignature() { |
90 | ResourceSignatureImpl resourceSignature = new ResourceSignatureImpl(); |
91 | return resourceSignature; |
92 | } |
93 | |
94 | /** |
95 | * <!-- begin-user-doc --> |
96 | * <!-- end-user-doc --> |
97 | * @generated |
98 | */ |
99 | public ResourceRepository createResourceRepository() { |
100 | ResourceRepositoryImpl resourceRepository = new ResourceRepositoryImpl(); |
101 | return resourceRepository; |
102 | } |
103 | |
104 | /** |
105 | * <!-- begin-user-doc --> |
106 | * <!-- end-user-doc --> |
107 | * @generated |
108 | */ |
109 | public CommunicationLinkResourceType createCommunicationLinkResourceType() { |
110 | CommunicationLinkResourceTypeImpl communicationLinkResourceType = new CommunicationLinkResourceTypeImpl(); |
111 | return communicationLinkResourceType; |
112 | } |
113 | |
114 | /** |
115 | * <!-- begin-user-doc --> |
116 | * <!-- end-user-doc --> |
117 | * @generated |
118 | */ |
119 | public ResourceInterface createResourceInterface() { |
120 | ResourceInterfaceImpl resourceInterface = new ResourceInterfaceImpl(); |
121 | return resourceInterface; |
122 | } |
123 | |
124 | /** |
125 | * <!-- begin-user-doc --> |
126 | * <!-- end-user-doc --> |
127 | * @generated |
128 | */ |
129 | public ProcessingResourceType createProcessingResourceType() { |
130 | ProcessingResourceTypeImpl processingResourceType = new ProcessingResourceTypeImpl(); |
131 | return processingResourceType; |
132 | } |
133 | |
134 | /** |
135 | * <!-- begin-user-doc --> |
136 | * <!-- end-user-doc --> |
137 | * @generated |
138 | */ |
139 | public ResourcetypePackage getResourcetypePackage() { |
140 | return (ResourcetypePackage)getEPackage(); |
141 | } |
142 | |
143 | /** |
144 | * <!-- begin-user-doc --> |
145 | * <!-- end-user-doc --> |
146 | * @deprecated |
147 | * @generated |
148 | */ |
149 | @Deprecated |
150 | public static ResourcetypePackage getPackage() { |
151 | return ResourcetypePackage.eINSTANCE; |
152 | } |
153 | |
154 | } //ResourcetypeFactoryImpl |