1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.sensitivity.impl; |
8 | |
9 | import de.uka.ipd.sdq.sensitivity.FailureDimension; |
10 | import de.uka.ipd.sdq.sensitivity.FailureDimensionResultSpecification; |
11 | import de.uka.ipd.sdq.sensitivity.SensitivityPackage; |
12 | |
13 | import org.eclipse.emf.common.notify.Notification; |
14 | |
15 | import org.eclipse.emf.ecore.EClass; |
16 | |
17 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model object '<em><b>Failure Dimension Result Specification</b></em>'. |
22 | * <!-- end-user-doc --> |
23 | * <p> |
24 | * The following features are implemented: |
25 | * <ul> |
26 | * <li>{@link de.uka.ipd.sdq.sensitivity.impl.FailureDimensionResultSpecificationImpl#getFailureDimension__FailureDimensionResultSpecification <em>Failure Dimension Failure Dimension Result Specification</em>}</li> |
27 | * </ul> |
28 | * </p> |
29 | * |
30 | * @generated |
31 | */ |
32 | public class FailureDimensionResultSpecificationImpl extends SensitivityResultSpecificationImpl implements FailureDimensionResultSpecification { |
33 | /** |
34 | * The default value of the '{@link #getFailureDimension__FailureDimensionResultSpecification() <em>Failure Dimension Failure Dimension Result Specification</em>}' attribute. |
35 | * <!-- begin-user-doc --> |
36 | * <!-- end-user-doc --> |
37 | * @see #getFailureDimension__FailureDimensionResultSpecification() |
38 | * @generated |
39 | * @ordered |
40 | */ |
41 | protected static final FailureDimension FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION_EDEFAULT = FailureDimension.SOFTWARE; |
42 | |
43 | /** |
44 | * The cached value of the '{@link #getFailureDimension__FailureDimensionResultSpecification() <em>Failure Dimension Failure Dimension Result Specification</em>}' attribute. |
45 | * <!-- begin-user-doc --> |
46 | * <!-- end-user-doc --> |
47 | * @see #getFailureDimension__FailureDimensionResultSpecification() |
48 | * @generated |
49 | * @ordered |
50 | */ |
51 | protected FailureDimension failureDimension__FailureDimensionResultSpecification = FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION_EDEFAULT; |
52 | |
53 | /** |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @generated |
57 | */ |
58 | protected FailureDimensionResultSpecificationImpl() { |
59 | super(); |
60 | } |
61 | |
62 | /** |
63 | * <!-- begin-user-doc --> |
64 | * <!-- end-user-doc --> |
65 | * @generated |
66 | */ |
67 | @Override |
68 | protected EClass eStaticClass() { |
69 | return SensitivityPackage.Literals.FAILURE_DIMENSION_RESULT_SPECIFICATION; |
70 | } |
71 | |
72 | /** |
73 | * <!-- begin-user-doc --> |
74 | * <!-- end-user-doc --> |
75 | * @generated |
76 | */ |
77 | public FailureDimension getFailureDimension__FailureDimensionResultSpecification() { |
78 | return failureDimension__FailureDimensionResultSpecification; |
79 | } |
80 | |
81 | /** |
82 | * <!-- begin-user-doc --> |
83 | * <!-- end-user-doc --> |
84 | * @generated |
85 | */ |
86 | public void setFailureDimension__FailureDimensionResultSpecification(FailureDimension newFailureDimension__FailureDimensionResultSpecification) { |
87 | FailureDimension oldFailureDimension__FailureDimensionResultSpecification = failureDimension__FailureDimensionResultSpecification; |
88 | failureDimension__FailureDimensionResultSpecification = newFailureDimension__FailureDimensionResultSpecification == null ? FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION_EDEFAULT : newFailureDimension__FailureDimensionResultSpecification; |
89 | if (eNotificationRequired()) |
90 | eNotify(new ENotificationImpl(this, Notification.SET, SensitivityPackage.FAILURE_DIMENSION_RESULT_SPECIFICATION__FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION, oldFailureDimension__FailureDimensionResultSpecification, failureDimension__FailureDimensionResultSpecification)); |
91 | } |
92 | |
93 | /** |
94 | * <!-- begin-user-doc --> |
95 | * <!-- end-user-doc --> |
96 | * @generated |
97 | */ |
98 | @Override |
99 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
100 | switch (featureID) { |
101 | case SensitivityPackage.FAILURE_DIMENSION_RESULT_SPECIFICATION__FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION: |
102 | return getFailureDimension__FailureDimensionResultSpecification(); |
103 | } |
104 | return super.eGet(featureID, resolve, coreType); |
105 | } |
106 | |
107 | /** |
108 | * <!-- begin-user-doc --> |
109 | * <!-- end-user-doc --> |
110 | * @generated |
111 | */ |
112 | @Override |
113 | public void eSet(int featureID, Object newValue) { |
114 | switch (featureID) { |
115 | case SensitivityPackage.FAILURE_DIMENSION_RESULT_SPECIFICATION__FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION: |
116 | setFailureDimension__FailureDimensionResultSpecification((FailureDimension)newValue); |
117 | return; |
118 | } |
119 | super.eSet(featureID, newValue); |
120 | } |
121 | |
122 | /** |
123 | * <!-- begin-user-doc --> |
124 | * <!-- end-user-doc --> |
125 | * @generated |
126 | */ |
127 | @Override |
128 | public void eUnset(int featureID) { |
129 | switch (featureID) { |
130 | case SensitivityPackage.FAILURE_DIMENSION_RESULT_SPECIFICATION__FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION: |
131 | setFailureDimension__FailureDimensionResultSpecification(FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION_EDEFAULT); |
132 | return; |
133 | } |
134 | super.eUnset(featureID); |
135 | } |
136 | |
137 | /** |
138 | * <!-- begin-user-doc --> |
139 | * <!-- end-user-doc --> |
140 | * @generated |
141 | */ |
142 | @Override |
143 | public boolean eIsSet(int featureID) { |
144 | switch (featureID) { |
145 | case SensitivityPackage.FAILURE_DIMENSION_RESULT_SPECIFICATION__FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION: |
146 | return failureDimension__FailureDimensionResultSpecification != FAILURE_DIMENSION_FAILURE_DIMENSION_RESULT_SPECIFICATION_EDEFAULT; |
147 | } |
148 | return super.eIsSet(featureID); |
149 | } |
150 | |
151 | /** |
152 | * <!-- begin-user-doc --> |
153 | * <!-- end-user-doc --> |
154 | * @generated |
155 | */ |
156 | @Override |
157 | public String toString() { |
158 | if (eIsProxy()) return super.toString(); |
159 | |
160 | StringBuffer result = new StringBuffer(super.toString()); |
161 | result.append(" (failureDimension__FailureDimensionResultSpecification: "); |
162 | result.append(failureDimension__FailureDimensionResultSpecification); |
163 | result.append(')'); |
164 | return result.toString(); |
165 | } |
166 | |
167 | } //FailureDimensionResultSpecificationImpl |