1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.fzi.se.quality.parameters.impl; |
8 | |
9 | import de.fzi.se.quality.parameters.*; |
10 | |
11 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.EObject; |
13 | import org.eclipse.emf.ecore.EPackage; |
14 | |
15 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
16 | |
17 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
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 ParametersFactoryImpl extends EFactoryImpl implements ParametersFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static ParametersFactory init() { |
33 | try { |
34 | ParametersFactory theParametersFactory = (ParametersFactory)EPackage.Registry.INSTANCE.getEFactory("http://fzi.de/PalladioComponentModel/Quality/Parameters/0.2"); |
35 | if (theParametersFactory != null) { |
36 | return theParametersFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new ParametersFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public ParametersFactoryImpl() { |
52 | super(); |
53 | } |
54 | |
55 | /** |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | @Override |
61 | public EObject create(EClass eClass) { |
62 | switch (eClass.getClassifierID()) { |
63 | case ParametersPackage.PARAMETER_INSTANCE: return createParameterInstance(); |
64 | case ParametersPackage.CALL_INSTANCE: return createCallInstance(); |
65 | case ParametersPackage.COMPONENT_INSTANCE: return createComponentInstance(); |
66 | default: |
67 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
68 | } |
69 | } |
70 | |
71 | /** |
72 | * <!-- begin-user-doc --> |
73 | * <!-- end-user-doc --> |
74 | * @generated |
75 | */ |
76 | public ParameterInstance createParameterInstance() { |
77 | ParameterInstanceImpl parameterInstance = new ParameterInstanceImpl(); |
78 | return parameterInstance; |
79 | } |
80 | |
81 | /** |
82 | * <!-- begin-user-doc --> |
83 | * <!-- end-user-doc --> |
84 | * @generated |
85 | */ |
86 | public CallInstance createCallInstance() { |
87 | CallInstanceImpl callInstance = new CallInstanceImpl(); |
88 | return callInstance; |
89 | } |
90 | |
91 | /** |
92 | * <!-- begin-user-doc --> |
93 | * <!-- end-user-doc --> |
94 | * @generated |
95 | */ |
96 | public ComponentInstance createComponentInstance() { |
97 | ComponentInstanceImpl componentInstance = new ComponentInstanceImpl(); |
98 | return componentInstance; |
99 | } |
100 | |
101 | /** |
102 | * <!-- begin-user-doc --> |
103 | * <!-- end-user-doc --> |
104 | * @generated |
105 | */ |
106 | public ParametersPackage getParametersPackage() { |
107 | return (ParametersPackage)getEPackage(); |
108 | } |
109 | |
110 | /** |
111 | * <!-- begin-user-doc --> |
112 | * <!-- end-user-doc --> |
113 | * @deprecated |
114 | * @generated |
115 | */ |
116 | @Deprecated |
117 | public static ParametersPackage getPackage() { |
118 | return ParametersPackage.eINSTANCE; |
119 | } |
120 | |
121 | } //ParametersFactoryImpl |