1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.QualityProperties.impl; |
8 | |
9 | import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.*; |
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 QualityPropertiesFactoryImpl extends EFactoryImpl implements QualityPropertiesFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static QualityPropertiesFactory init() { |
33 | try { |
34 | QualityPropertiesFactory theQualityPropertiesFactory = (QualityPropertiesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///DesignDecision/QualityProperties.ecore"); |
35 | if (theQualityPropertiesFactory != null) { |
36 | return theQualityPropertiesFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new QualityPropertiesFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public QualityPropertiesFactoryImpl() { |
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 QualityPropertiesPackage.CONFIDENCE_INTERVAL: return createConfidenceInterval(); |
64 | case QualityPropertiesPackage.ELEMENT_QUALITY_PROPERTY: return createElementQualityProperty(); |
65 | case QualityPropertiesPackage.INTEGER_QUALITY_PROPERTY: return createIntegerQualityProperty(); |
66 | case QualityPropertiesPackage.DOUBLE_QUALITY_PROPERTY: return createDoubleQualityProperty(); |
67 | default: |
68 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
69 | } |
70 | } |
71 | |
72 | /** |
73 | * <!-- begin-user-doc --> |
74 | * <!-- end-user-doc --> |
75 | * @generated |
76 | */ |
77 | public ConfidenceInterval createConfidenceInterval() { |
78 | ConfidenceIntervalImpl confidenceInterval = new ConfidenceIntervalImpl(); |
79 | return confidenceInterval; |
80 | } |
81 | |
82 | /** |
83 | * <!-- begin-user-doc --> |
84 | * <!-- end-user-doc --> |
85 | * @generated |
86 | */ |
87 | public ElementQualityProperty createElementQualityProperty() { |
88 | ElementQualityPropertyImpl elementQualityProperty = new ElementQualityPropertyImpl(); |
89 | return elementQualityProperty; |
90 | } |
91 | |
92 | /** |
93 | * <!-- begin-user-doc --> |
94 | * <!-- end-user-doc --> |
95 | * @generated |
96 | */ |
97 | public IntegerQualityProperty createIntegerQualityProperty() { |
98 | IntegerQualityPropertyImpl integerQualityProperty = new IntegerQualityPropertyImpl(); |
99 | return integerQualityProperty; |
100 | } |
101 | |
102 | /** |
103 | * <!-- begin-user-doc --> |
104 | * <!-- end-user-doc --> |
105 | * @generated |
106 | */ |
107 | public DoubleQualityProperty createDoubleQualityProperty() { |
108 | DoubleQualityPropertyImpl doubleQualityProperty = new DoubleQualityPropertyImpl(); |
109 | return doubleQualityProperty; |
110 | } |
111 | |
112 | /** |
113 | * <!-- begin-user-doc --> |
114 | * <!-- end-user-doc --> |
115 | * @generated |
116 | */ |
117 | public QualityPropertiesPackage getQualityPropertiesPackage() { |
118 | return (QualityPropertiesPackage)getEPackage(); |
119 | } |
120 | |
121 | /** |
122 | * <!-- begin-user-doc --> |
123 | * <!-- end-user-doc --> |
124 | * @deprecated |
125 | * @generated |
126 | */ |
127 | @Deprecated |
128 | public static QualityPropertiesPackage getPackage() { |
129 | return QualityPropertiesPackage.eINSTANCE; |
130 | } |
131 | |
132 | } //QualityPropertiesFactoryImpl |