Skip to content

Package: ProcessorImpl

ProcessorImpl

nameinstructionbranchcomplexitylinemethod
ProcessorImpl()
M: 21 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
eGet(int, boolean, boolean)
M: 29 C: 0
0%
M: 7 C: 0
0%
M: 7 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 61 C: 0
0%
M: 23 C: 0
0%
M: 15 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
eSet(int, Object)
M: 40 C: 0
0%
M: 7 C: 0
0%
M: 7 C: 0
0%
M: 15 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: 30 C: 0
0%
M: 7 C: 0
0%
M: 7 C: 0
0%
M: 15 C: 0
0%
M: 1 C: 0
0%
getClockSpeed()
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%
getManufactoringProcess()
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%
getNumberOfCores()
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%
getSocketconnectorType()
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%
getThermalDesignPower()
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%
getVendor()
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%
setClockSpeed(int)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
setManufactoringProcess(ManufactoringProcess)
M: 25 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
setNumberOfCores(int)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
setSocketconnectorType(SocketConnectorType)
M: 25 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
setThermalDesignPower(int)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
setVendor(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: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
toString()
M: 73 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 17 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2018 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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emfforms.coffee.model.coffee.impl;
15:
16: import org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.impl.ENotificationImpl;
19: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
20: import org.eclipse.emfforms.coffee.model.coffee.CoffeePackage;
21: import org.eclipse.emfforms.coffee.model.coffee.ManufactoringProcess;
22: import org.eclipse.emfforms.coffee.model.coffee.Processor;
23: import org.eclipse.emfforms.coffee.model.coffee.SocketConnectorType;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model object '<em><b>Processor</b></em>'.
28: * <!-- end-user-doc -->
29: * <p>
30: * The following features are implemented:
31: * </p>
32: * <ul>
33: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getVendor <em>Vendor</em>}</li>
34: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getClockSpeed <em>Clock Speed</em>}</li>
35: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getNumberOfCores <em>Number Of
36: * Cores</em>}</li>
37: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getSocketconnectorType <em>Socketconnector
38: * Type</em>}</li>
39: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getThermalDesignPower <em>Thermal Design
40: * Power</em>}</li>
41: * <li>{@link org.eclipse.emfforms.coffee.model.coffee.impl.ProcessorImpl#getManufactoringProcess <em>Manufactoring
42: * Process</em>}</li>
43: * </ul>
44: *
45: * @generated
46: */
47: public class ProcessorImpl extends MinimalEObjectImpl.Container implements Processor {
48:         /**
49:          * The default value of the '{@link #getVendor() <em>Vendor</em>}' attribute.
50:          * <!-- begin-user-doc -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @see #getVendor()
54:          * @generated
55:          * @ordered
56:          */
57:         protected static final String VENDOR_EDEFAULT = null;
58:
59:         /**
60:          * The cached value of the '{@link #getVendor() <em>Vendor</em>}' attribute.
61:          * <!-- begin-user-doc -->
62:          * <!-- end-user-doc -->
63:          *
64:          * @see #getVendor()
65:          * @generated
66:          * @ordered
67:          */
68:         protected String vendor = VENDOR_EDEFAULT;
69:
70:         /**
71:          * The default value of the '{@link #getClockSpeed() <em>Clock Speed</em>}' attribute.
72:          * <!-- begin-user-doc -->
73:          * <!-- end-user-doc -->
74:          *
75:          * @see #getClockSpeed()
76:          * @generated
77:          * @ordered
78:          */
79:         protected static final int CLOCK_SPEED_EDEFAULT = 0;
80:
81:         /**
82:          * The cached value of the '{@link #getClockSpeed() <em>Clock Speed</em>}' attribute.
83:          * <!-- begin-user-doc -->
84:          * <!-- end-user-doc -->
85:          *
86:          * @see #getClockSpeed()
87:          * @generated
88:          * @ordered
89:          */
90:         protected int clockSpeed = CLOCK_SPEED_EDEFAULT;
91:
92:         /**
93:          * The default value of the '{@link #getNumberOfCores() <em>Number Of Cores</em>}' attribute.
94:          * <!-- begin-user-doc -->
95:          * <!-- end-user-doc -->
96:          *
97:          * @see #getNumberOfCores()
98:          * @generated
99:          * @ordered
100:          */
101:         protected static final int NUMBER_OF_CORES_EDEFAULT = 0;
102:
103:         /**
104:          * The cached value of the '{@link #getNumberOfCores() <em>Number Of Cores</em>}' attribute.
105:          * <!-- begin-user-doc -->
106:          * <!-- end-user-doc -->
107:          *
108:          * @see #getNumberOfCores()
109:          * @generated
110:          * @ordered
111:          */
112:         protected int numberOfCores = NUMBER_OF_CORES_EDEFAULT;
113:
114:         /**
115:          * The default value of the '{@link #getSocketconnectorType() <em>Socketconnector Type</em>}' attribute.
116:          * <!-- begin-user-doc -->
117:          * <!-- end-user-doc -->
118:          *
119:          * @see #getSocketconnectorType()
120:          * @generated
121:          * @ordered
122:          */
123:         protected static final SocketConnectorType SOCKETCONNECTOR_TYPE_EDEFAULT = SocketConnectorType.A1T;
124:
125:         /**
126:          * The cached value of the '{@link #getSocketconnectorType() <em>Socketconnector Type</em>}' attribute.
127:          * <!-- begin-user-doc -->
128:          * <!-- end-user-doc -->
129:          *
130:          * @see #getSocketconnectorType()
131:          * @generated
132:          * @ordered
133:          */
134:         protected SocketConnectorType socketconnectorType = SOCKETCONNECTOR_TYPE_EDEFAULT;
135:
136:         /**
137:          * The default value of the '{@link #getThermalDesignPower() <em>Thermal Design Power</em>}' attribute.
138:          * <!-- begin-user-doc -->
139:          * <!-- end-user-doc -->
140:          *
141:          * @see #getThermalDesignPower()
142:          * @generated
143:          * @ordered
144:          */
145:         protected static final int THERMAL_DESIGN_POWER_EDEFAULT = 0;
146:
147:         /**
148:          * The cached value of the '{@link #getThermalDesignPower() <em>Thermal Design Power</em>}' attribute.
149:          * <!-- begin-user-doc -->
150:          * <!-- end-user-doc -->
151:          *
152:          * @see #getThermalDesignPower()
153:          * @generated
154:          * @ordered
155:          */
156:         protected int thermalDesignPower = THERMAL_DESIGN_POWER_EDEFAULT;
157:
158:         /**
159:          * The default value of the '{@link #getManufactoringProcess() <em>Manufactoring Process</em>}' attribute.
160:          * <!-- begin-user-doc -->
161:          * <!-- end-user-doc -->
162:          *
163:          * @see #getManufactoringProcess()
164:          * @generated
165:          * @ordered
166:          */
167:         protected static final ManufactoringProcess MANUFACTORING_PROCESS_EDEFAULT = ManufactoringProcess.NM18;
168:
169:         /**
170:          * The cached value of the '{@link #getManufactoringProcess() <em>Manufactoring Process</em>}' attribute.
171:          * <!-- begin-user-doc -->
172:          * <!-- end-user-doc -->
173:          *
174:          * @see #getManufactoringProcess()
175:          * @generated
176:          * @ordered
177:          */
178:         protected ManufactoringProcess manufactoringProcess = MANUFACTORING_PROCESS_EDEFAULT;
179:
180:         /**
181:          * <!-- begin-user-doc -->
182:          * <!-- end-user-doc -->
183:          *
184:          * @generated
185:          */
186:         protected ProcessorImpl() {
187:                 super();
188:         }
189:
190:         /**
191:          * <!-- begin-user-doc -->
192:          * <!-- end-user-doc -->
193:          *
194:          * @generated
195:          */
196:         @Override
197:         protected EClass eStaticClass() {
198:                 return CoffeePackage.Literals.PROCESSOR;
199:         }
200:
201:         /**
202:          * <!-- begin-user-doc -->
203:          * <!-- end-user-doc -->
204:          *
205:          * @generated
206:          */
207:         @Override
208:         public String getVendor() {
209:                 return vendor;
210:         }
211:
212:         /**
213:          * <!-- begin-user-doc -->
214:          * <!-- end-user-doc -->
215:          *
216:          * @generated
217:          */
218:         @Override
219:         public void setVendor(String newVendor) {
220:                 final String oldVendor = vendor;
221:                 vendor = newVendor;
222:•                if (eNotificationRequired()) {
223:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__VENDOR, oldVendor, vendor));
224:                 }
225:         }
226:
227:         /**
228:          * <!-- begin-user-doc -->
229:          * <!-- end-user-doc -->
230:          *
231:          * @generated
232:          */
233:         @Override
234:         public int getClockSpeed() {
235:                 return clockSpeed;
236:         }
237:
238:         /**
239:          * <!-- begin-user-doc -->
240:          * <!-- end-user-doc -->
241:          *
242:          * @generated
243:          */
244:         @Override
245:         public void setClockSpeed(int newClockSpeed) {
246:                 final int oldClockSpeed = clockSpeed;
247:                 clockSpeed = newClockSpeed;
248:•                if (eNotificationRequired()) {
249:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__CLOCK_SPEED, oldClockSpeed,
250:                                 clockSpeed));
251:                 }
252:         }
253:
254:         /**
255:          * <!-- begin-user-doc -->
256:          * <!-- end-user-doc -->
257:          *
258:          * @generated
259:          */
260:         @Override
261:         public int getNumberOfCores() {
262:                 return numberOfCores;
263:         }
264:
265:         /**
266:          * <!-- begin-user-doc -->
267:          * <!-- end-user-doc -->
268:          *
269:          * @generated
270:          */
271:         @Override
272:         public void setNumberOfCores(int newNumberOfCores) {
273:                 final int oldNumberOfCores = numberOfCores;
274:                 numberOfCores = newNumberOfCores;
275:•                if (eNotificationRequired()) {
276:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__NUMBER_OF_CORES,
277:                                 oldNumberOfCores, numberOfCores));
278:                 }
279:         }
280:
281:         /**
282:          * <!-- begin-user-doc -->
283:          * <!-- end-user-doc -->
284:          *
285:          * @generated
286:          */
287:         @Override
288:         public SocketConnectorType getSocketconnectorType() {
289:                 return socketconnectorType;
290:         }
291:
292:         /**
293:          * <!-- begin-user-doc -->
294:          * <!-- end-user-doc -->
295:          *
296:          * @generated
297:          */
298:         @Override
299:         public void setSocketconnectorType(SocketConnectorType newSocketconnectorType) {
300:                 final SocketConnectorType oldSocketconnectorType = socketconnectorType;
301:•                socketconnectorType = newSocketconnectorType == null ? SOCKETCONNECTOR_TYPE_EDEFAULT : newSocketconnectorType;
302:•                if (eNotificationRequired()) {
303:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__SOCKETCONNECTOR_TYPE,
304:                                 oldSocketconnectorType, socketconnectorType));
305:                 }
306:         }
307:
308:         /**
309:          * <!-- begin-user-doc -->
310:          * <!-- end-user-doc -->
311:          *
312:          * @generated
313:          */
314:         @Override
315:         public int getThermalDesignPower() {
316:                 return thermalDesignPower;
317:         }
318:
319:         /**
320:          * <!-- begin-user-doc -->
321:          * <!-- end-user-doc -->
322:          *
323:          * @generated
324:          */
325:         @Override
326:         public void setThermalDesignPower(int newThermalDesignPower) {
327:                 final int oldThermalDesignPower = thermalDesignPower;
328:                 thermalDesignPower = newThermalDesignPower;
329:•                if (eNotificationRequired()) {
330:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__THERMAL_DESIGN_POWER,
331:                                 oldThermalDesignPower, thermalDesignPower));
332:                 }
333:         }
334:
335:         /**
336:          * <!-- begin-user-doc -->
337:          * <!-- end-user-doc -->
338:          *
339:          * @generated
340:          */
341:         @Override
342:         public ManufactoringProcess getManufactoringProcess() {
343:                 return manufactoringProcess;
344:         }
345:
346:         /**
347:          * <!-- begin-user-doc -->
348:          * <!-- end-user-doc -->
349:          *
350:          * @generated
351:          */
352:         @Override
353:         public void setManufactoringProcess(ManufactoringProcess newManufactoringProcess) {
354:                 final ManufactoringProcess oldManufactoringProcess = manufactoringProcess;
355:•                manufactoringProcess = newManufactoringProcess == null ? MANUFACTORING_PROCESS_EDEFAULT
356:                         : newManufactoringProcess;
357:•                if (eNotificationRequired()) {
358:                         eNotify(new ENotificationImpl(this, Notification.SET, CoffeePackage.PROCESSOR__MANUFACTORING_PROCESS,
359:                                 oldManufactoringProcess, manufactoringProcess));
360:                 }
361:         }
362:
363:         /**
364:          * <!-- begin-user-doc -->
365:          * <!-- end-user-doc -->
366:          *
367:          * @generated
368:          */
369:         @Override
370:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
371:•                switch (featureID) {
372:                 case CoffeePackage.PROCESSOR__VENDOR:
373:                         return getVendor();
374:                 case CoffeePackage.PROCESSOR__CLOCK_SPEED:
375:                         return getClockSpeed();
376:                 case CoffeePackage.PROCESSOR__NUMBER_OF_CORES:
377:                         return getNumberOfCores();
378:                 case CoffeePackage.PROCESSOR__SOCKETCONNECTOR_TYPE:
379:                         return getSocketconnectorType();
380:                 case CoffeePackage.PROCESSOR__THERMAL_DESIGN_POWER:
381:                         return getThermalDesignPower();
382:                 case CoffeePackage.PROCESSOR__MANUFACTORING_PROCESS:
383:                         return getManufactoringProcess();
384:                 }
385:                 return super.eGet(featureID, resolve, coreType);
386:         }
387:
388:         /**
389:          * <!-- begin-user-doc -->
390:          * <!-- end-user-doc -->
391:          *
392:          * @generated
393:          */
394:         @Override
395:         public void eSet(int featureID, Object newValue) {
396:•                switch (featureID) {
397:                 case CoffeePackage.PROCESSOR__VENDOR:
398:                         setVendor((String) newValue);
399:                         return;
400:                 case CoffeePackage.PROCESSOR__CLOCK_SPEED:
401:                         setClockSpeed((Integer) newValue);
402:                         return;
403:                 case CoffeePackage.PROCESSOR__NUMBER_OF_CORES:
404:                         setNumberOfCores((Integer) newValue);
405:                         return;
406:                 case CoffeePackage.PROCESSOR__SOCKETCONNECTOR_TYPE:
407:                         setSocketconnectorType((SocketConnectorType) newValue);
408:                         return;
409:                 case CoffeePackage.PROCESSOR__THERMAL_DESIGN_POWER:
410:                         setThermalDesignPower((Integer) newValue);
411:                         return;
412:                 case CoffeePackage.PROCESSOR__MANUFACTORING_PROCESS:
413:                         setManufactoringProcess((ManufactoringProcess) newValue);
414:                         return;
415:                 }
416:                 super.eSet(featureID, newValue);
417:         }
418:
419:         /**
420:          * <!-- begin-user-doc -->
421:          * <!-- end-user-doc -->
422:          *
423:          * @generated
424:          */
425:         @Override
426:         public void eUnset(int featureID) {
427:•                switch (featureID) {
428:                 case CoffeePackage.PROCESSOR__VENDOR:
429:                         setVendor(VENDOR_EDEFAULT);
430:                         return;
431:                 case CoffeePackage.PROCESSOR__CLOCK_SPEED:
432:                         setClockSpeed(CLOCK_SPEED_EDEFAULT);
433:                         return;
434:                 case CoffeePackage.PROCESSOR__NUMBER_OF_CORES:
435:                         setNumberOfCores(NUMBER_OF_CORES_EDEFAULT);
436:                         return;
437:                 case CoffeePackage.PROCESSOR__SOCKETCONNECTOR_TYPE:
438:                         setSocketconnectorType(SOCKETCONNECTOR_TYPE_EDEFAULT);
439:                         return;
440:                 case CoffeePackage.PROCESSOR__THERMAL_DESIGN_POWER:
441:                         setThermalDesignPower(THERMAL_DESIGN_POWER_EDEFAULT);
442:                         return;
443:                 case CoffeePackage.PROCESSOR__MANUFACTORING_PROCESS:
444:                         setManufactoringProcess(MANUFACTORING_PROCESS_EDEFAULT);
445:                         return;
446:                 }
447:                 super.eUnset(featureID);
448:         }
449:
450:         /**
451:          * <!-- begin-user-doc -->
452:          * <!-- end-user-doc -->
453:          *
454:          * @generated
455:          */
456:         @Override
457:         public boolean eIsSet(int featureID) {
458:•                switch (featureID) {
459:                 case CoffeePackage.PROCESSOR__VENDOR:
460:•                        return VENDOR_EDEFAULT == null ? vendor != null : !VENDOR_EDEFAULT.equals(vendor);
461:                 case CoffeePackage.PROCESSOR__CLOCK_SPEED:
462:•                        return clockSpeed != CLOCK_SPEED_EDEFAULT;
463:                 case CoffeePackage.PROCESSOR__NUMBER_OF_CORES:
464:•                        return numberOfCores != NUMBER_OF_CORES_EDEFAULT;
465:                 case CoffeePackage.PROCESSOR__SOCKETCONNECTOR_TYPE:
466:•                        return socketconnectorType != SOCKETCONNECTOR_TYPE_EDEFAULT;
467:                 case CoffeePackage.PROCESSOR__THERMAL_DESIGN_POWER:
468:•                        return thermalDesignPower != THERMAL_DESIGN_POWER_EDEFAULT;
469:                 case CoffeePackage.PROCESSOR__MANUFACTORING_PROCESS:
470:•                        return manufactoringProcess != MANUFACTORING_PROCESS_EDEFAULT;
471:                 }
472:                 return super.eIsSet(featureID);
473:         }
474:
475:         /**
476:          * <!-- begin-user-doc -->
477:          * <!-- end-user-doc -->
478:          *
479:          * @generated
480:          */
481:         @Override
482:         public String toString() {
483:•                if (eIsProxy()) {
484:                         return super.toString();
485:                 }
486:
487:                 final StringBuffer result = new StringBuffer(super.toString());
488:                 result.append(" (vendor: "); //$NON-NLS-1$
489:                 result.append(vendor);
490:                 result.append(", clockSpeed: "); //$NON-NLS-1$
491:                 result.append(clockSpeed);
492:                 result.append(", numberOfCores: "); //$NON-NLS-1$
493:                 result.append(numberOfCores);
494:                 result.append(", socketconnectorType: "); //$NON-NLS-1$
495:                 result.append(socketconnectorType);
496:                 result.append(", thermalDesignPower: "); //$NON-NLS-1$
497:                 result.append(thermalDesignPower);
498:                 result.append(", manufactoringProcess: "); //$NON-NLS-1$
499:                 result.append(manufactoringProcess);
500:                 result.append(')');
501:                 return result.toString();
502:         }
503:
504: } // ProcessorImpl