EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][edu.kit.ipd.sdq.completionfeaturemodel.impl]

COVERAGE SUMMARY FOR SOURCE FILE [DisambiguationRuleImpl.java]

nameclass, %method, %block, %line, %
DisambiguationRuleImpl.java0%   (0/1)0%   (0/12)0%   (0/217)0%   (0/56)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DisambiguationRuleImpl0%   (0/1)0%   (0/12)0%   (0/217)0%   (0/56)
DisambiguationRuleImpl (): void 0%   (0/1)0%   (0/3)0%   (0/2)
basicGetFeature (): CompletionFeature 0%   (0/1)0%   (0/3)0%   (0/1)
eGet (int, boolean, boolean): Object 0%   (0/1)0%   (0/22)0%   (0/6)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eIsSet (int): boolean 0%   (0/1)0%   (0/35)0%   (0/5)
eSet (int, Object): void 0%   (0/1)0%   (0/32)0%   (0/11)
eStaticClass (): EClass 0%   (0/1)0%   (0/2)0%   (0/1)
eUnset (int): void 0%   (0/1)0%   (0/18)0%   (0/9)
getDisambiguationCondition (): EList 0%   (0/1)0%   (0/14)0%   (0/3)
getFeature (): CompletionFeature 0%   (0/1)0%   (0/38)0%   (0/7)
getTransformationFragment (): EList 0%   (0/1)0%   (0/14)0%   (0/3)
setFeature (CompletionFeature): void 0%   (0/1)0%   (0/21)0%   (0/5)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package edu.kit.ipd.sdq.completionfeaturemodel.impl;
8 
9import java.util.Collection;
10 
11import org.eclipse.emf.common.notify.Notification;
12import org.eclipse.emf.common.notify.NotificationChain;
13import org.eclipse.emf.common.util.EList;
14import org.eclipse.emf.ecore.EClass;
15import org.eclipse.emf.ecore.InternalEObject;
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17import org.eclipse.emf.ecore.impl.EObjectImpl;
18import org.eclipse.emf.ecore.util.EObjectContainmentEList;
19import org.eclipse.emf.ecore.util.EObjectResolvingEList;
20import org.eclipse.emf.ecore.util.InternalEList;
21 
22import EssentialOCL.OperationCallExp;
23import QVTBase.Transformation;
24import QVTRelation.Relation;
25import edu.kit.ipd.sdq.completionfeaturemodel.CompletionFeature;
26import edu.kit.ipd.sdq.completionfeaturemodel.DisambiguationRule;
27import edu.kit.ipd.sdq.completionfeaturemodel.completionfeaturemodelPackage;
28 
29/**
30 * <!-- begin-user-doc -->
31 * An implementation of the model object '<em><b>Disambiguation Rule</b></em>'.
32 * <!-- end-user-doc -->
33 * <p>
34 * The following features are implemented:
35 * <ul>
36 *   <li>{@link edu.kit.ipd.sdq.completionfeaturemodel.impl.DisambiguationRuleImpl#getFeature <em>Feature</em>}</li>
37 *   <li>{@link edu.kit.ipd.sdq.completionfeaturemodel.impl.DisambiguationRuleImpl#getDisambiguationCondition <em>Disambiguation Condition</em>}</li>
38 *   <li>{@link edu.kit.ipd.sdq.completionfeaturemodel.impl.DisambiguationRuleImpl#getTransformationFragment <em>Transformation Fragment</em>}</li>
39 * </ul>
40 * </p>
41 *
42 * @generated
43 */
44public class DisambiguationRuleImpl extends EObjectImpl implements DisambiguationRule {
45        /**
46         * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
47         * <!-- begin-user-doc -->
48         * <!-- end-user-doc -->
49         * @see #getFeature()
50         * @generated
51         * @ordered
52         */
53        protected CompletionFeature feature;
54 
55        /**
56         * The cached value of the '{@link #getDisambiguationCondition() <em>Disambiguation Condition</em>}' containment reference list.
57         * <!-- begin-user-doc -->
58         * <!-- end-user-doc -->
59         * @see #getDisambiguationCondition()
60         * @generated
61         * @ordered
62         */
63        protected EList<OperationCallExp> disambiguationCondition;
64 
65        /**
66         * The cached value of the '{@link #getTransformationFragment() <em>Transformation Fragment</em>}' reference list.
67         * <!-- begin-user-doc -->
68         * <!-- end-user-doc -->
69         * @see #getTransformationFragment()
70         * @generated
71         * @ordered
72         */
73        protected EList<Transformation> transformationFragment;
74 
75        /**
76         * <!-- begin-user-doc -->
77         * <!-- end-user-doc -->
78         * @generated
79         */
80        protected DisambiguationRuleImpl() {
81                super();
82        }
83 
84        /**
85         * <!-- begin-user-doc -->
86         * <!-- end-user-doc -->
87         * @generated
88         */
89        @Override
90        protected EClass eStaticClass() {
91                return completionfeaturemodelPackage.Literals.DISAMBIGUATION_RULE;
92        }
93 
94        /**
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        public CompletionFeature getFeature() {
100                if (feature != null && feature.eIsProxy()) {
101                        InternalEObject oldFeature = (InternalEObject)feature;
102                        feature = (CompletionFeature)eResolveProxy(oldFeature);
103                        if (feature != oldFeature) {
104                                if (eNotificationRequired())
105                                        eNotify(new ENotificationImpl(this, Notification.RESOLVE, completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE, oldFeature, feature));
106                        }
107                }
108                return feature;
109        }
110 
111        /**
112         * <!-- begin-user-doc -->
113         * <!-- end-user-doc -->
114         * @generated
115         */
116        public CompletionFeature basicGetFeature() {
117                return feature;
118        }
119 
120        /**
121         * <!-- begin-user-doc -->
122         * <!-- end-user-doc -->
123         * @generated
124         */
125        public void setFeature(CompletionFeature newFeature) {
126                CompletionFeature oldFeature = feature;
127                feature = newFeature;
128                if (eNotificationRequired())
129                        eNotify(new ENotificationImpl(this, Notification.SET, completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE, oldFeature, feature));
130        }
131 
132        /**
133         * <!-- begin-user-doc -->
134         * <!-- end-user-doc -->
135         * @generated
136         */
137        public EList<OperationCallExp> getDisambiguationCondition() {
138                if (disambiguationCondition == null) {
139                        disambiguationCondition = new EObjectContainmentEList<OperationCallExp>(OperationCallExp.class, this, completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION);
140                }
141                return disambiguationCondition;
142        }
143 
144        /**
145         * <!-- begin-user-doc -->
146         * <!-- end-user-doc -->
147         * @generated
148         */
149        public EList<Transformation> getTransformationFragment() {
150                if (transformationFragment == null) {
151                        transformationFragment = new EObjectResolvingEList<Transformation>(Transformation.class, this, completionfeaturemodelPackage.DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT);
152                }
153                return transformationFragment;
154        }
155 
156        /**
157         * <!-- begin-user-doc -->
158         * <!-- end-user-doc -->
159         * @generated
160         */
161        @Override
162        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
163                switch (featureID) {
164                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION:
165                                return ((InternalEList<?>)getDisambiguationCondition()).basicRemove(otherEnd, msgs);
166                }
167                return super.eInverseRemove(otherEnd, featureID, msgs);
168        }
169 
170        /**
171         * <!-- begin-user-doc -->
172         * <!-- end-user-doc -->
173         * @generated
174         */
175        @Override
176        public Object eGet(int featureID, boolean resolve, boolean coreType) {
177                switch (featureID) {
178                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE:
179                                if (resolve) return getFeature();
180                                return basicGetFeature();
181                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION:
182                                return getDisambiguationCondition();
183                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT:
184                                return getTransformationFragment();
185                }
186                return super.eGet(featureID, resolve, coreType);
187        }
188 
189        /**
190         * <!-- begin-user-doc -->
191         * <!-- end-user-doc -->
192         * @generated
193         */
194        @SuppressWarnings("unchecked")
195        @Override
196        public void eSet(int featureID, Object newValue) {
197                switch (featureID) {
198                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE:
199                                setFeature((CompletionFeature)newValue);
200                                return;
201                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION:
202                                getDisambiguationCondition().clear();
203                                getDisambiguationCondition().addAll((Collection<? extends OperationCallExp>)newValue);
204                                return;
205                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT:
206                                getTransformationFragment().clear();
207                                getTransformationFragment().addAll((Collection<? extends Transformation>)newValue);
208                                return;
209                }
210                super.eSet(featureID, newValue);
211        }
212 
213        /**
214         * <!-- begin-user-doc -->
215         * <!-- end-user-doc -->
216         * @generated
217         */
218        @Override
219        public void eUnset(int featureID) {
220                switch (featureID) {
221                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE:
222                                setFeature((CompletionFeature)null);
223                                return;
224                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION:
225                                getDisambiguationCondition().clear();
226                                return;
227                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT:
228                                getTransformationFragment().clear();
229                                return;
230                }
231                super.eUnset(featureID);
232        }
233 
234        /**
235         * <!-- begin-user-doc -->
236         * <!-- end-user-doc -->
237         * @generated
238         */
239        @Override
240        public boolean eIsSet(int featureID) {
241                switch (featureID) {
242                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__FEATURE:
243                                return feature != null;
244                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION:
245                                return disambiguationCondition != null && !disambiguationCondition.isEmpty();
246                        case completionfeaturemodelPackage.DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT:
247                                return transformationFragment != null && !transformationFragment.isEmpty();
248                }
249                return super.eIsSet(featureID);
250        }
251 
252} //DisambiguationRuleImpl

[all classes][edu.kit.ipd.sdq.completionfeaturemodel.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov