EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][QVTBase.impl]

COVERAGE SUMMARY FOR SOURCE FILE [TypedModelImpl.java]

nameclass, %method, %block, %line, %
TypedModelImpl.java0%   (0/1)0%   (0/14)0%   (0/272)0%   (0/67)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TypedModelImpl0%   (0/1)0%   (0/14)0%   (0/272)0%   (0/67)
TypedModelImpl (): void 0%   (0/1)0%   (0/3)0%   (0/2)
basicSetTransformation (Transformation, NotificationChain): NotificationChain 0%   (0/1)0%   (0/9)0%   (0/2)
eBasicRemoveFromContainerFeature (NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eGet (int, boolean, boolean): Object 0%   (0/1)0%   (0/17)0%   (0/5)
eInverseAdd (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/21)0%   (0/5)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/13)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)
getDependsOn (): EList 0%   (0/1)0%   (0/14)0%   (0/3)
getTransformation (): Transformation 0%   (0/1)0%   (0/10)0%   (0/2)
getUsedPackage (): EList 0%   (0/1)0%   (0/14)0%   (0/3)
setTransformation (Transformation): void 0%   (0/1)0%   (0/69)0%   (0/13)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package QVTBase.impl;
8 
9import EMOF.impl.NamedElementImpl;
10 
11import QVTBase.QVTBasePackage;
12import QVTBase.Transformation;
13import QVTBase.TypedModel;
14 
15import java.util.Collection;
16 
17import org.eclipse.emf.common.notify.Notification;
18import org.eclipse.emf.common.notify.NotificationChain;
19 
20import org.eclipse.emf.common.util.EList;
21 
22import org.eclipse.emf.ecore.EClass;
23import org.eclipse.emf.ecore.InternalEObject;
24 
25import org.eclipse.emf.ecore.impl.ENotificationImpl;
26 
27import org.eclipse.emf.ecore.util.EObjectResolvingEList;
28import org.eclipse.emf.ecore.util.EcoreUtil;
29 
30/**
31 * <!-- begin-user-doc -->
32 * An implementation of the model object '<em><b>Typed Model</b></em>'.
33 * <!-- end-user-doc -->
34 * <p>
35 * The following features are implemented:
36 * <ul>
37 *   <li>{@link QVTBase.impl.TypedModelImpl#getDependsOn <em>Depends On</em>}</li>
38 *   <li>{@link QVTBase.impl.TypedModelImpl#getTransformation <em>Transformation</em>}</li>
39 *   <li>{@link QVTBase.impl.TypedModelImpl#getUsedPackage <em>Used Package</em>}</li>
40 * </ul>
41 * </p>
42 *
43 * @generated
44 */
45public class TypedModelImpl extends NamedElementImpl implements TypedModel {
46        /**
47         * The cached value of the '{@link #getDependsOn() <em>Depends On</em>}' reference list.
48         * <!-- begin-user-doc -->
49         * <!-- end-user-doc -->
50         * @see #getDependsOn()
51         * @generated
52         * @ordered
53         */
54        protected EList<TypedModel> dependsOn;
55 
56        /**
57         * The cached value of the '{@link #getUsedPackage() <em>Used Package</em>}' reference list.
58         * <!-- begin-user-doc -->
59         * <!-- end-user-doc -->
60         * @see #getUsedPackage()
61         * @generated
62         * @ordered
63         */
64        protected EList<EMOF.Package> usedPackage;
65 
66        /**
67         * <!-- begin-user-doc -->
68         * <!-- end-user-doc -->
69         * @generated
70         */
71        protected TypedModelImpl() {
72                super();
73        }
74 
75        /**
76         * <!-- begin-user-doc -->
77         * <!-- end-user-doc -->
78         * @generated
79         */
80        @Override
81        protected EClass eStaticClass() {
82                return QVTBasePackage.Literals.TYPED_MODEL;
83        }
84 
85        /**
86         * <!-- begin-user-doc -->
87         * <!-- end-user-doc -->
88         * @generated
89         */
90        public EList<TypedModel> getDependsOn() {
91                if (dependsOn == null) {
92                        dependsOn = new EObjectResolvingEList<TypedModel>(TypedModel.class, this, QVTBasePackage.TYPED_MODEL__DEPENDS_ON);
93                }
94                return dependsOn;
95        }
96 
97        /**
98         * <!-- begin-user-doc -->
99         * <!-- end-user-doc -->
100         * @generated
101         */
102        public Transformation getTransformation() {
103                if (eContainerFeatureID() != QVTBasePackage.TYPED_MODEL__TRANSFORMATION) return null;
104                return (Transformation)eContainer();
105        }
106 
107        /**
108         * <!-- begin-user-doc -->
109         * <!-- end-user-doc -->
110         * @generated
111         */
112        public NotificationChain basicSetTransformation(Transformation newTransformation, NotificationChain msgs) {
113                msgs = eBasicSetContainer((InternalEObject)newTransformation, QVTBasePackage.TYPED_MODEL__TRANSFORMATION, msgs);
114                return msgs;
115        }
116 
117        /**
118         * <!-- begin-user-doc -->
119         * <!-- end-user-doc -->
120         * @generated
121         */
122        public void setTransformation(Transformation newTransformation) {
123                if (newTransformation != eInternalContainer() || (eContainerFeatureID() != QVTBasePackage.TYPED_MODEL__TRANSFORMATION && newTransformation != null)) {
124                        if (EcoreUtil.isAncestor(this, newTransformation))
125                                throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
126                        NotificationChain msgs = null;
127                        if (eInternalContainer() != null)
128                                msgs = eBasicRemoveFromContainer(msgs);
129                        if (newTransformation != null)
130                                msgs = ((InternalEObject)newTransformation).eInverseAdd(this, QVTBasePackage.TRANSFORMATION__MODEL_PARAMETER, Transformation.class, msgs);
131                        msgs = basicSetTransformation(newTransformation, msgs);
132                        if (msgs != null) msgs.dispatch();
133                }
134                else if (eNotificationRequired())
135                        eNotify(new ENotificationImpl(this, Notification.SET, QVTBasePackage.TYPED_MODEL__TRANSFORMATION, newTransformation, newTransformation));
136        }
137 
138        /**
139         * <!-- begin-user-doc -->
140         * <!-- end-user-doc -->
141         * @generated
142         */
143        public EList<EMOF.Package> getUsedPackage() {
144                if (usedPackage == null) {
145                        usedPackage = new EObjectResolvingEList<EMOF.Package>(EMOF.Package.class, this, QVTBasePackage.TYPED_MODEL__USED_PACKAGE);
146                }
147                return usedPackage;
148        }
149 
150        /**
151         * <!-- begin-user-doc -->
152         * <!-- end-user-doc -->
153         * @generated
154         */
155        @Override
156        public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
157                switch (featureID) {
158                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
159                                if (eInternalContainer() != null)
160                                        msgs = eBasicRemoveFromContainer(msgs);
161                                return basicSetTransformation((Transformation)otherEnd, msgs);
162                }
163                return super.eInverseAdd(otherEnd, featureID, msgs);
164        }
165 
166        /**
167         * <!-- begin-user-doc -->
168         * <!-- end-user-doc -->
169         * @generated
170         */
171        @Override
172        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
173                switch (featureID) {
174                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
175                                return basicSetTransformation(null, msgs);
176                }
177                return super.eInverseRemove(otherEnd, featureID, msgs);
178        }
179 
180        /**
181         * <!-- begin-user-doc -->
182         * <!-- end-user-doc -->
183         * @generated
184         */
185        @Override
186        public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
187                switch (eContainerFeatureID()) {
188                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
189                                return eInternalContainer().eInverseRemove(this, QVTBasePackage.TRANSFORMATION__MODEL_PARAMETER, Transformation.class, msgs);
190                }
191                return super.eBasicRemoveFromContainerFeature(msgs);
192        }
193 
194        /**
195         * <!-- begin-user-doc -->
196         * <!-- end-user-doc -->
197         * @generated
198         */
199        @Override
200        public Object eGet(int featureID, boolean resolve, boolean coreType) {
201                switch (featureID) {
202                        case QVTBasePackage.TYPED_MODEL__DEPENDS_ON:
203                                return getDependsOn();
204                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
205                                return getTransformation();
206                        case QVTBasePackage.TYPED_MODEL__USED_PACKAGE:
207                                return getUsedPackage();
208                }
209                return super.eGet(featureID, resolve, coreType);
210        }
211 
212        /**
213         * <!-- begin-user-doc -->
214         * <!-- end-user-doc -->
215         * @generated
216         */
217        @SuppressWarnings("unchecked")
218        @Override
219        public void eSet(int featureID, Object newValue) {
220                switch (featureID) {
221                        case QVTBasePackage.TYPED_MODEL__DEPENDS_ON:
222                                getDependsOn().clear();
223                                getDependsOn().addAll((Collection<? extends TypedModel>)newValue);
224                                return;
225                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
226                                setTransformation((Transformation)newValue);
227                                return;
228                        case QVTBasePackage.TYPED_MODEL__USED_PACKAGE:
229                                getUsedPackage().clear();
230                                getUsedPackage().addAll((Collection<? extends EMOF.Package>)newValue);
231                                return;
232                }
233                super.eSet(featureID, newValue);
234        }
235 
236        /**
237         * <!-- begin-user-doc -->
238         * <!-- end-user-doc -->
239         * @generated
240         */
241        @Override
242        public void eUnset(int featureID) {
243                switch (featureID) {
244                        case QVTBasePackage.TYPED_MODEL__DEPENDS_ON:
245                                getDependsOn().clear();
246                                return;
247                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
248                                setTransformation((Transformation)null);
249                                return;
250                        case QVTBasePackage.TYPED_MODEL__USED_PACKAGE:
251                                getUsedPackage().clear();
252                                return;
253                }
254                super.eUnset(featureID);
255        }
256 
257        /**
258         * <!-- begin-user-doc -->
259         * <!-- end-user-doc -->
260         * @generated
261         */
262        @Override
263        public boolean eIsSet(int featureID) {
264                switch (featureID) {
265                        case QVTBasePackage.TYPED_MODEL__DEPENDS_ON:
266                                return dependsOn != null && !dependsOn.isEmpty();
267                        case QVTBasePackage.TYPED_MODEL__TRANSFORMATION:
268                                return getTransformation() != null;
269                        case QVTBasePackage.TYPED_MODEL__USED_PACKAGE:
270                                return usedPackage != null && !usedPackage.isEmpty();
271                }
272                return super.eIsSet(featureID);
273        }
274 
275} //TypedModelImpl

[all classes][QVTBase.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov