Skip to content

Package: TableContentWithInnerChild2Impl

TableContentWithInnerChild2Impl

nameinstructionbranchcomplexitylinemethod
TableContentWithInnerChild2Impl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
basicSetInnerChild(TableContent, NotificationChain)
M: 18 C: 11
38%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 6 C: 4
40%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 5
45%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
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: 6 C: 7
54%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 2
67%
M: 0 C: 1
100%
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: 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: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 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%
setInnerChild(TableContent)
M: 25 C: 27
52%
M: 6 C: 4
40%
M: 5 C: 1
17%
M: 6 C: 9
60%
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: package org.eclipse.emf.ecp.view.validation.test.model.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.validation.test.model.TableContent;
22: import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithInnerChild2;
23: import org.eclipse.emf.ecp.view.validation.test.model.TestPackage;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model object '<em><b>Table Content With Inner Child2</b></em>'.
28: * <!-- end-user-doc -->
29: * <p>
30: * The following features are implemented:
31: * </p>
32: * <ul>
33: * <li>{@link org.eclipse.emf.ecp.view.validation.test.model.impl.TableContentWithInnerChild2Impl#getInnerChild
34: * <em>Inner Child</em>}</li>
35: * </ul>
36: *
37: * @generated
38: */
39: public class TableContentWithInnerChild2Impl extends TableContentImpl implements TableContentWithInnerChild2 {
40:         /**
41:          * The cached value of the '{@link #getInnerChild() <em>Inner Child</em>}' containment reference.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @see #getInnerChild()
46:          * @generated
47:          * @ordered
48:          */
49:         protected TableContent innerChild;
50:
51:         /**
52:          * <!-- begin-user-doc -->
53:          * <!-- end-user-doc -->
54:          *
55:          * @generated
56:          */
57:         protected TableContentWithInnerChild2Impl() {
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 TestPackage.Literals.TABLE_CONTENT_WITH_INNER_CHILD2;
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         @Override
79:         public TableContent getInnerChild() {
80:                 return innerChild;
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         public NotificationChain basicSetInnerChild(TableContent newInnerChild, NotificationChain msgs) {
90:                 final TableContent oldInnerChild = innerChild;
91:                 innerChild = newInnerChild;
92:•                if (eNotificationRequired()) {
93:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
94:                                 TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD, oldInnerChild, newInnerChild);
95:•                        if (msgs == null) {
96:                                 msgs = notification;
97:                         } else {
98:                                 msgs.add(notification);
99:                         }
100:                 }
101:                 return msgs;
102:         }
103:
104:         /**
105:          * <!-- begin-user-doc -->
106:          * <!-- end-user-doc -->
107:          *
108:          * @generated
109:          */
110:         @Override
111:         public void setInnerChild(TableContent newInnerChild) {
112:•                if (newInnerChild != innerChild) {
113:                         NotificationChain msgs = null;
114:•                        if (innerChild != null) {
115:                                 msgs = ((InternalEObject) innerChild).eInverseRemove(this,
116:                                         EOPPOSITE_FEATURE_BASE - TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD, null, msgs);
117:                         }
118:•                        if (newInnerChild != null) {
119:                                 msgs = ((InternalEObject) newInnerChild).eInverseAdd(this,
120:                                         EOPPOSITE_FEATURE_BASE - TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD, null, msgs);
121:                         }
122:                         msgs = basicSetInnerChild(newInnerChild, msgs);
123:•                        if (msgs != null) {
124:                                 msgs.dispatch();
125:                         }
126:•                } else if (eNotificationRequired()) {
127:                         eNotify(new ENotificationImpl(this, Notification.SET,
128:                                 TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD, newInnerChild, newInnerChild));
129:                 }
130:         }
131:
132:         /**
133:          * <!-- begin-user-doc -->
134:          * <!-- end-user-doc -->
135:          *
136:          * @generated
137:          */
138:         @Override
139:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
140:•                switch (featureID) {
141:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD:
142:                         return basicSetInnerChild(null, msgs);
143:                 }
144:                 return super.eInverseRemove(otherEnd, featureID, msgs);
145:         }
146:
147:         /**
148:          * <!-- begin-user-doc -->
149:          * <!-- end-user-doc -->
150:          *
151:          * @generated
152:          */
153:         @Override
154:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
155:•                switch (featureID) {
156:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD:
157:                         return getInnerChild();
158:                 }
159:                 return super.eGet(featureID, resolve, coreType);
160:         }
161:
162:         /**
163:          * <!-- begin-user-doc -->
164:          * <!-- end-user-doc -->
165:          *
166:          * @generated
167:          */
168:         @Override
169:         public void eSet(int featureID, Object newValue) {
170:•                switch (featureID) {
171:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD:
172:                         setInnerChild((TableContent) newValue);
173:                         return;
174:                 }
175:                 super.eSet(featureID, newValue);
176:         }
177:
178:         /**
179:          * <!-- begin-user-doc -->
180:          * <!-- end-user-doc -->
181:          *
182:          * @generated
183:          */
184:         @Override
185:         public void eUnset(int featureID) {
186:•                switch (featureID) {
187:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD:
188:                         setInnerChild((TableContent) null);
189:                         return;
190:                 }
191:                 super.eUnset(featureID);
192:         }
193:
194:         /**
195:          * <!-- begin-user-doc -->
196:          * <!-- end-user-doc -->
197:          *
198:          * @generated
199:          */
200:         @Override
201:         public boolean eIsSet(int featureID) {
202:•                switch (featureID) {
203:                 case TestPackage.TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD:
204:•                        return innerChild != null;
205:                 }
206:                 return super.eIsSet(featureID);
207:         }
208:
209: } // TableContentWithInnerChild2Impl