Skip to content

Package: EdaptTestBImpl

EdaptTestBImpl

nameinstructionbranchcomplexitylinemethod
EdaptTestBImpl()
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%
basicGetA()
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%
basicGetC()
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%
eGet(int, boolean, boolean)
M: 24 C: 0
0%
M: 7 C: 0
0%
M: 5 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 20 C: 0
0%
M: 7 C: 0
0%
M: 5 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
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: 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: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getA()
M: 38 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getC()
M: 38 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
setA(EdaptTestA)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
setC(EdaptTestC)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2013 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: */
13: package org.eclipse.emf.ecp.view.edapt.util.test.model.b.impl;
14:
15: import org.eclipse.emf.common.notify.Notification;
16: import org.eclipse.emf.ecore.EClass;
17: import org.eclipse.emf.ecore.InternalEObject;
18: import org.eclipse.emf.ecore.impl.ENotificationImpl;
19: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
20: import org.eclipse.emf.ecp.view.edapt.util.test.model.a.EdaptTestA;
21: import org.eclipse.emf.ecp.view.edapt.util.test.model.b.EdaptTestB;
22: import org.eclipse.emf.ecp.view.edapt.util.test.model.b.EdaptTestBPackage;
23: import org.eclipse.emf.ecp.view.edapt.util.test.model.c.EdaptTestC;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model object '<em><b>B</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.edapt.util.test.model.b.impl.EdaptTestBImpl#getA <em>A</em>}</li>
34: * <li>{@link org.eclipse.emf.ecp.view.edapt.util.test.model.b.impl.EdaptTestBImpl#getC <em>C</em>}</li>
35: * </ul>
36: *
37: * @generated
38: */
39: public class EdaptTestBImpl extends MinimalEObjectImpl.Container implements EdaptTestB {
40:         /**
41:          * The cached value of the '{@link #getA() <em>A</em>}' reference.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @see #getA()
46:          * @generated
47:          * @ordered
48:          */
49:         protected EdaptTestA a;
50:
51:         /**
52:          * The cached value of the '{@link #getC() <em>C</em>}' reference.
53:          * <!-- begin-user-doc -->
54:          * <!-- end-user-doc -->
55:          *
56:          * @see #getC()
57:          * @generated
58:          * @ordered
59:          */
60:         protected EdaptTestC c;
61:
62:         /**
63:          * <!-- begin-user-doc -->
64:          * <!-- end-user-doc -->
65:          *
66:          * @generated
67:          */
68:         protected EdaptTestBImpl() {
69:                 super();
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         @Override
79:         protected EClass eStaticClass() {
80:                 return EdaptTestBPackage.Literals.B;
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         @Override
90:         public EdaptTestA getA() {
91:•                if (a != null && a.eIsProxy()) {
92:                         final InternalEObject oldA = (InternalEObject) a;
93:                         a = (EdaptTestA) eResolveProxy(oldA);
94:•                        if (a != oldA) {
95:•                                if (eNotificationRequired()) {
96:                                         eNotify(new ENotificationImpl(this, Notification.RESOLVE, EdaptTestBPackage.B__A, oldA, a));
97:                                 }
98:                         }
99:                 }
100:                 return a;
101:         }
102:
103:         /**
104:          * <!-- begin-user-doc -->
105:          * <!-- end-user-doc -->
106:          *
107:          * @generated
108:          */
109:         public EdaptTestA basicGetA() {
110:                 return a;
111:         }
112:
113:         /**
114:          * <!-- begin-user-doc -->
115:          * <!-- end-user-doc -->
116:          *
117:          * @generated
118:          */
119:         @Override
120:         public void setA(EdaptTestA newA) {
121:                 final EdaptTestA oldA = a;
122:                 a = newA;
123:•                if (eNotificationRequired()) {
124:                         eNotify(new ENotificationImpl(this, Notification.SET, EdaptTestBPackage.B__A, oldA, a));
125:                 }
126:         }
127:
128:         /**
129:          * <!-- begin-user-doc -->
130:          * <!-- end-user-doc -->
131:          *
132:          * @generated
133:          */
134:         @Override
135:         public EdaptTestC getC() {
136:•                if (c != null && c.eIsProxy()) {
137:                         final InternalEObject oldC = (InternalEObject) c;
138:                         c = (EdaptTestC) eResolveProxy(oldC);
139:•                        if (c != oldC) {
140:•                                if (eNotificationRequired()) {
141:                                         eNotify(new ENotificationImpl(this, Notification.RESOLVE, EdaptTestBPackage.B__C, oldC, c));
142:                                 }
143:                         }
144:                 }
145:                 return c;
146:         }
147:
148:         /**
149:          * <!-- begin-user-doc -->
150:          * <!-- end-user-doc -->
151:          *
152:          * @generated
153:          */
154:         public EdaptTestC basicGetC() {
155:                 return c;
156:         }
157:
158:         /**
159:          * <!-- begin-user-doc -->
160:          * <!-- end-user-doc -->
161:          *
162:          * @generated
163:          */
164:         @Override
165:         public void setC(EdaptTestC newC) {
166:                 final EdaptTestC oldC = c;
167:                 c = newC;
168:•                if (eNotificationRequired()) {
169:                         eNotify(new ENotificationImpl(this, Notification.SET, EdaptTestBPackage.B__C, oldC, c));
170:                 }
171:         }
172:
173:         /**
174:          * <!-- begin-user-doc -->
175:          * <!-- end-user-doc -->
176:          *
177:          * @generated
178:          */
179:         @Override
180:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
181:•                switch (featureID) {
182:                 case EdaptTestBPackage.B__A:
183:•                        if (resolve) {
184:                                 return getA();
185:                         }
186:                         return basicGetA();
187:                 case EdaptTestBPackage.B__C:
188:•                        if (resolve) {
189:                                 return getC();
190:                         }
191:                         return basicGetC();
192:                 }
193:                 return super.eGet(featureID, resolve, coreType);
194:         }
195:
196:         /**
197:          * <!-- begin-user-doc -->
198:          * <!-- end-user-doc -->
199:          *
200:          * @generated
201:          */
202:         @Override
203:         public void eSet(int featureID, Object newValue) {
204:•                switch (featureID) {
205:                 case EdaptTestBPackage.B__A:
206:                         setA((EdaptTestA) newValue);
207:                         return;
208:                 case EdaptTestBPackage.B__C:
209:                         setC((EdaptTestC) newValue);
210:                         return;
211:                 }
212:                 super.eSet(featureID, newValue);
213:         }
214:
215:         /**
216:          * <!-- begin-user-doc -->
217:          * <!-- end-user-doc -->
218:          *
219:          * @generated
220:          */
221:         @Override
222:         public void eUnset(int featureID) {
223:•                switch (featureID) {
224:                 case EdaptTestBPackage.B__A:
225:                         setA((EdaptTestA) null);
226:                         return;
227:                 case EdaptTestBPackage.B__C:
228:                         setC((EdaptTestC) null);
229:                         return;
230:                 }
231:                 super.eUnset(featureID);
232:         }
233:
234:         /**
235:          * <!-- begin-user-doc -->
236:          * <!-- end-user-doc -->
237:          *
238:          * @generated
239:          */
240:         @Override
241:         public boolean eIsSet(int featureID) {
242:•                switch (featureID) {
243:                 case EdaptTestBPackage.B__A:
244:•                        return a != null;
245:                 case EdaptTestBPackage.B__C:
246:•                        return c != null;
247:                 }
248:                 return super.eIsSet(featureID);
249:         }
250:
251: } // EdaptTestBImpl