Skip to content

Package: FImpl

FImpl

nameinstructionbranchcomplexitylinemethod
FImpl()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 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: 19 C: 0
0%
M: 5 C: 0
0%
M: 4 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 31 C: 0
0%
M: 11 C: 0
0%
M: 7 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%
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%
getName()
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%
setC(C)
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%
setName(String)
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%
static {...}
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%
toString()
M: 28 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%

Coverage

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