Skip to content

Package: ChildImpl

ChildImpl

nameinstructionbranchcomplexitylinemethod
ChildImpl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
basicSetIntermediateTarget(IntermediateTarget, NotificationChain)
M: 29 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
eGet(int, boolean, boolean)
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 13 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eSet(int, Object)
M: 12 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
eStaticClass()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
eUnset(int)
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getIntermediateTarget()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setIntermediateTarget(IntermediateTarget)
M: 52 C: 0
0%
M: 10 C: 0
0%
M: 6 C: 0
0%
M: 15 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.mapping.test.example.impl;
15:
16: import org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.common.notify.NotificationChain;
18: import org.eclipse.emf.ecore.EClass;
19: import org.eclipse.emf.ecore.InternalEObject;
20: import org.eclipse.emf.ecore.impl.ENotificationImpl;
21: import org.eclipse.emf.ecp.view.mapping.test.example.Child;
22: import org.eclipse.emf.ecp.view.mapping.test.example.ExamplePackage;
23: import org.eclipse.emf.ecp.view.mapping.test.example.IntermediateTarget;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model object '<em><b>Child</b></em>'.
28: * <!-- end-user-doc -->
29: * <p>
30: * The following features are implemented:
31: * <ul>
32: * <li>{@link org.eclipse.emf.ecp.view.mapping.test.example.impl.ChildImpl#getIntermediateTarget <em>Intermediate Target
33: * </em>}</li>
34: * </ul>
35: * </p>
36: *
37: * @generated
38: */
39: public class ChildImpl extends AbstractChildImpl implements Child {
40:         /**
41:          * The cached value of the '{@link #getIntermediateTarget() <em>Intermediate Target</em>}' containment reference.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @see #getIntermediateTarget()
46:          * @generated
47:          * @ordered
48:          */
49:         protected IntermediateTarget intermediateTarget;
50:
51:         /**
52:          * <!-- begin-user-doc -->
53:          * <!-- end-user-doc -->
54:          *
55:          * @generated
56:          */
57:         protected ChildImpl() {
58:                 super();
59:         }
60:
61:         /**
62:          * <!-- begin-user-doc -->
63:          * <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         @Override
68:         protected EClass eStaticClass() {
69:                 return ExamplePackage.Literals.CHILD;
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         @Override
79:         public IntermediateTarget getIntermediateTarget() {
80:                 return intermediateTarget;
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         public NotificationChain basicSetIntermediateTarget(IntermediateTarget newIntermediateTarget,
90:                 NotificationChain msgs) {
91:                 final IntermediateTarget oldIntermediateTarget = intermediateTarget;
92:                 intermediateTarget = newIntermediateTarget;
93:•                if (eNotificationRequired()) {
94:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
95:                                 ExamplePackage.CHILD__INTERMEDIATE_TARGET, oldIntermediateTarget, newIntermediateTarget);
96:•                        if (msgs == null) {
97:                                 msgs = notification;
98:                         } else {
99:                                 msgs.add(notification);
100:                         }
101:                 }
102:                 return msgs;
103:         }
104:
105:         /**
106:          * <!-- begin-user-doc -->
107:          * <!-- end-user-doc -->
108:          *
109:          * @generated
110:          */
111:         @Override
112:         public void setIntermediateTarget(IntermediateTarget newIntermediateTarget) {
113:•                if (newIntermediateTarget != intermediateTarget) {
114:                         NotificationChain msgs = null;
115:•                        if (intermediateTarget != null) {
116:                                 msgs = ((InternalEObject) intermediateTarget).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
117:                                         - ExamplePackage.CHILD__INTERMEDIATE_TARGET, null, msgs);
118:                         }
119:•                        if (newIntermediateTarget != null) {
120:                                 msgs = ((InternalEObject) newIntermediateTarget).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
121:                                         - ExamplePackage.CHILD__INTERMEDIATE_TARGET, null, msgs);
122:                         }
123:                         msgs = basicSetIntermediateTarget(newIntermediateTarget, msgs);
124:•                        if (msgs != null) {
125:                                 msgs.dispatch();
126:                         }
127:•                } else if (eNotificationRequired()) {
128:                         eNotify(new ENotificationImpl(this, Notification.SET, ExamplePackage.CHILD__INTERMEDIATE_TARGET,
129:                                 newIntermediateTarget, newIntermediateTarget));
130:                 }
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @generated
138:          */
139:         @Override
140:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
141:•                switch (featureID) {
142:                 case ExamplePackage.CHILD__INTERMEDIATE_TARGET:
143:                         return basicSetIntermediateTarget(null, msgs);
144:                 }
145:                 return super.eInverseRemove(otherEnd, featureID, msgs);
146:         }
147:
148:         /**
149:          * <!-- begin-user-doc -->
150:          * <!-- end-user-doc -->
151:          *
152:          * @generated
153:          */
154:         @Override
155:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
156:•                switch (featureID) {
157:                 case ExamplePackage.CHILD__INTERMEDIATE_TARGET:
158:                         return getIntermediateTarget();
159:                 }
160:                 return super.eGet(featureID, resolve, coreType);
161:         }
162:
163:         /**
164:          * <!-- begin-user-doc -->
165:          * <!-- end-user-doc -->
166:          *
167:          * @generated
168:          */
169:         @Override
170:         public void eSet(int featureID, Object newValue) {
171:•                switch (featureID) {
172:                 case ExamplePackage.CHILD__INTERMEDIATE_TARGET:
173:                         setIntermediateTarget((IntermediateTarget) newValue);
174:                         return;
175:                 }
176:                 super.eSet(featureID, newValue);
177:         }
178:
179:         /**
180:          * <!-- begin-user-doc -->
181:          * <!-- end-user-doc -->
182:          *
183:          * @generated
184:          */
185:         @Override
186:         public void eUnset(int featureID) {
187:•                switch (featureID) {
188:                 case ExamplePackage.CHILD__INTERMEDIATE_TARGET:
189:                         setIntermediateTarget((IntermediateTarget) null);
190:                         return;
191:                 }
192:                 super.eUnset(featureID);
193:         }
194:
195:         /**
196:          * <!-- begin-user-doc -->
197:          * <!-- end-user-doc -->
198:          *
199:          * @generated
200:          */
201:         @Override
202:         public boolean eIsSet(int featureID) {
203:•                switch (featureID) {
204:                 case ExamplePackage.CHILD__INTERMEDIATE_TARGET:
205:•                        return intermediateTarget != null;
206:                 }
207:                 return super.eIsSet(featureID);
208:         }
209:
210: } // ChildImpl