Skip to content

Package: TableContentWithInnerChildImpl

TableContentWithInnerChildImpl

nameinstructionbranchcomplexitylinemethod
TableContentWithInnerChildImpl()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
basicSetInnerChild(TableContent, NotificationChain)
M: 4 C: 25
86%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 9
90%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 8
57%
M: 1 C: 2
67%
M: 1 C: 2
67%
M: 1 C: 3
75%
M: 0 C: 1
100%
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: 12 C: 19
61%
M: 4 C: 7
64%
M: 3 C: 4
57%
M: 1 C: 3
75%
M: 0 C: 1
100%
eSet(int, Object)
M: 17 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
eStaticClass()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
eUnset(int)
M: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getInnerChild()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getStuff()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setInnerChild(TableContent)
M: 13 C: 39
75%
M: 3 C: 7
70%
M: 2 C: 4
67%
M: 2 C: 13
87%
M: 0 C: 1
100%
setStuff(String)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 4
67%
M: 0 C: 1
100%
static {...}
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 3 C: 25
89%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 6
86%
M: 0 C: 1
100%

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: * Eugen Neufeld - initial API and implementation
13: *******************************************************************************/
14:
15: package org.eclipse.emf.ecp.view.validation.test.model.impl;
16:
17: import org.eclipse.emf.common.notify.Notification;
18: import org.eclipse.emf.common.notify.NotificationChain;
19: import org.eclipse.emf.ecore.EClass;
20: import org.eclipse.emf.ecore.InternalEObject;
21: import org.eclipse.emf.ecore.impl.ENotificationImpl;
22: import org.eclipse.emf.ecp.view.validation.test.model.TableContent;
23: import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithInnerChild;
24: import org.eclipse.emf.ecp.view.validation.test.model.TestPackage;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>Table Content With Inner Child</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * </p>
33: * <ul>
34: * <li>{@link org.eclipse.emf.ecp.view.validation.test.model.impl.TableContentWithInnerChildImpl#getInnerChild
35: * <em>Inner Child</em>}</li>
36: * <li>{@link org.eclipse.emf.ecp.view.validation.test.model.impl.TableContentWithInnerChildImpl#getStuff <em>Stuff</em>
37: * }</li>
38: * </ul>
39: *
40: * @generated
41: */
42: public class TableContentWithInnerChildImpl extends TableContentImpl implements TableContentWithInnerChild {
43:         /**
44:          * The cached value of the '{@link #getInnerChild() <em>Inner Child</em>}' containment reference.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @see #getInnerChild()
49:          * @generated
50:          * @ordered
51:          */
52:         protected TableContent innerChild;
53:
54:         /**
55:          * The default value of the '{@link #getStuff() <em>Stuff</em>}' attribute.
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @see #getStuff()
60:          * @generated
61:          * @ordered
62:          */
63:         protected static final String STUFF_EDEFAULT = null;
64:         /**
65:          * The cached value of the '{@link #getStuff() <em>Stuff</em>}' attribute.
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @see #getStuff()
70:          * @generated
71:          * @ordered
72:          */
73:         protected String stuff = STUFF_EDEFAULT;
74:
75:         /**
76:          * <!-- begin-user-doc -->
77:          * <!-- end-user-doc -->
78:          *
79:          * @generated
80:          */
81:         protected TableContentWithInnerChildImpl() {
82:                 super();
83:         }
84:
85:         /**
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         @Override
92:         protected EClass eStaticClass() {
93:                 return TestPackage.Literals.TABLE_CONTENT_WITH_INNER_CHILD;
94:         }
95:
96:         /**
97:          * <!-- begin-user-doc -->
98:          * <!-- end-user-doc -->
99:          *
100:          * @generated
101:          */
102:         @Override
103:         public TableContent getInnerChild() {
104:                 return innerChild;
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         public NotificationChain basicSetInnerChild(TableContent newInnerChild, NotificationChain msgs) {
114:                 final TableContent oldInnerChild = innerChild;
115:                 innerChild = newInnerChild;
116:•                if (eNotificationRequired()) {
117:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
118:                                 TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD, oldInnerChild, newInnerChild);
119:•                        if (msgs == null) {
120:                                 msgs = notification;
121:                         } else {
122:                                 msgs.add(notification);
123:                         }
124:                 }
125:                 return msgs;
126:         }
127:
128:         /**
129:          * <!-- begin-user-doc -->
130:          * <!-- end-user-doc -->
131:          *
132:          * @generated
133:          */
134:         @Override
135:         public void setInnerChild(TableContent newInnerChild) {
136:•                if (newInnerChild != innerChild) {
137:                         NotificationChain msgs = null;
138:•                        if (innerChild != null) {
139:                                 msgs = ((InternalEObject) innerChild).eInverseRemove(this,
140:                                         EOPPOSITE_FEATURE_BASE - TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD, null, msgs);
141:                         }
142:•                        if (newInnerChild != null) {
143:                                 msgs = ((InternalEObject) newInnerChild).eInverseAdd(this,
144:                                         EOPPOSITE_FEATURE_BASE - TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD, null, msgs);
145:                         }
146:                         msgs = basicSetInnerChild(newInnerChild, msgs);
147:•                        if (msgs != null) {
148:                                 msgs.dispatch();
149:                         }
150:•                } else if (eNotificationRequired()) {
151:                         eNotify(new ENotificationImpl(this, Notification.SET,
152:                                 TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD, newInnerChild, newInnerChild));
153:                 }
154:         }
155:
156:         /**
157:          * <!-- begin-user-doc -->
158:          * <!-- end-user-doc -->
159:          *
160:          * @generated
161:          */
162:         @Override
163:         public String getStuff() {
164:                 return stuff;
165:         }
166:
167:         /**
168:          * <!-- begin-user-doc -->
169:          * <!-- end-user-doc -->
170:          *
171:          * @generated
172:          */
173:         @Override
174:         public void setStuff(String newStuff) {
175:                 final String oldStuff = stuff;
176:                 stuff = newStuff;
177:•                if (eNotificationRequired()) {
178:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__STUFF,
179:                                 oldStuff, stuff));
180:                 }
181:         }
182:
183:         /**
184:          * <!-- begin-user-doc -->
185:          * <!-- end-user-doc -->
186:          *
187:          * @generated
188:          */
189:         @Override
190:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
191:•                switch (featureID) {
192:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD:
193:                         return basicSetInnerChild(null, msgs);
194:                 }
195:                 return super.eInverseRemove(otherEnd, featureID, msgs);
196:         }
197:
198:         /**
199:          * <!-- begin-user-doc -->
200:          * <!-- end-user-doc -->
201:          *
202:          * @generated
203:          */
204:         @Override
205:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
206:•                switch (featureID) {
207:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD:
208:                         return getInnerChild();
209:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__STUFF:
210:                         return getStuff();
211:                 }
212:                 return super.eGet(featureID, resolve, coreType);
213:         }
214:
215:         /**
216:          * <!-- begin-user-doc -->
217:          * <!-- end-user-doc -->
218:          *
219:          * @generated
220:          */
221:         @Override
222:         public void eSet(int featureID, Object newValue) {
223:•                switch (featureID) {
224:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD:
225:                         setInnerChild((TableContent) newValue);
226:                         return;
227:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__STUFF:
228:                         setStuff((String) newValue);
229:                         return;
230:                 }
231:                 super.eSet(featureID, newValue);
232:         }
233:
234:         /**
235:          * <!-- begin-user-doc -->
236:          * <!-- end-user-doc -->
237:          *
238:          * @generated
239:          */
240:         @Override
241:         public void eUnset(int featureID) {
242:•                switch (featureID) {
243:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD:
244:                         setInnerChild((TableContent) null);
245:                         return;
246:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__STUFF:
247:                         setStuff(STUFF_EDEFAULT);
248:                         return;
249:                 }
250:                 super.eUnset(featureID);
251:         }
252:
253:         /**
254:          * <!-- begin-user-doc -->
255:          * <!-- end-user-doc -->
256:          *
257:          * @generated
258:          */
259:         @Override
260:         public boolean eIsSet(int featureID) {
261:•                switch (featureID) {
262:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD:
263:•                        return innerChild != null;
264:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD__STUFF:
265:•                        return STUFF_EDEFAULT == null ? stuff != null : !STUFF_EDEFAULT.equals(stuff);
266:                 }
267:                 return super.eIsSet(featureID);
268:         }
269:
270:         /**
271:          * <!-- begin-user-doc -->
272:          * <!-- end-user-doc -->
273:          *
274:          * @generated
275:          */
276:         @Override
277:         public String toString() {
278:•                if (eIsProxy()) {
279:                         return super.toString();
280:                 }
281:
282:                 final StringBuffer result = new StringBuffer(super.toString());
283:                 result.append(" (stuff: ");
284:                 result.append(stuff);
285:                 result.append(')');
286:                 return result.toString();
287:         }
288:
289: } // TableContentWithInnerChildImpl