Skip to content

Package: MainboardImpl

MainboardImpl

nameinstructionbranchcomplexitylinemethod
MainboardImpl()
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%
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%
eIsSet(int)
M: 12 C: 12
50%
M: 4 C: 4
50%
M: 3 C: 2
40%
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%
getName()
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%
setName(String)
M: 0 C: 21
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 5
100%
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: 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-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: * 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.ecore.EClass;
18: import org.eclipse.emf.ecore.impl.ENotificationImpl;
19: import org.eclipse.emf.ecore.impl.EObjectImpl;
20: import org.eclipse.emf.ecp.view.validation.test.model.Mainboard;
21: import org.eclipse.emf.ecp.view.validation.test.model.TestPackage;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>Mainboard</b></em>'.
26: * <!-- end-user-doc -->
27: * <p>
28: * The following features are implemented:
29: * </p>
30: * <ul>
31: * <li>{@link org.eclipse.emf.ecp.view.validation.test.model.impl.MainboardImpl#getName <em>Name</em>}</li>
32: * </ul>
33: *
34: * @generated
35: */
36: public class MainboardImpl extends EObjectImpl implements Mainboard {
37:         /**
38:          * The default value of the '{@link #getName() <em>Name</em>}' attribute.
39:          * <!-- begin-user-doc -->
40:          * <!-- end-user-doc -->
41:          *
42:          * @see #getName()
43:          * @generated
44:          * @ordered
45:          */
46:         protected static final String NAME_EDEFAULT = null;
47:
48:         /**
49:          * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
50:          * <!-- begin-user-doc -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @see #getName()
54:          * @generated
55:          * @ordered
56:          */
57:         protected String name = NAME_EDEFAULT;
58:
59:         /**
60:          * <!-- begin-user-doc -->
61:          * <!-- end-user-doc -->
62:          *
63:          * @generated
64:          */
65:         protected MainboardImpl() {
66:                 super();
67:         }
68:
69:         /**
70:          * <!-- begin-user-doc -->
71:          * <!-- end-user-doc -->
72:          *
73:          * @generated
74:          */
75:         @Override
76:         protected EClass eStaticClass() {
77:                 return TestPackage.Literals.MAINBOARD;
78:         }
79:
80:         /**
81:          * <!-- begin-user-doc -->
82:          * <!-- end-user-doc -->
83:          *
84:          * @generated
85:          */
86:         @Override
87:         public String getName() {
88:                 return name;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public void setName(String newName) {
99:                 final String oldName = name;
100:                 name = newName;
101:•                if (eNotificationRequired()) {
102:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.MAINBOARD__NAME, oldName, name));
103:                 }
104:         }
105:
106:         /**
107:          * <!-- begin-user-doc -->
108:          * <!-- end-user-doc -->
109:          *
110:          * @generated
111:          */
112:         @Override
113:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
114:•                switch (featureID) {
115:                 case TestPackage.MAINBOARD__NAME:
116:                         return getName();
117:                 }
118:                 return super.eGet(featureID, resolve, coreType);
119:         }
120:
121:         /**
122:          * <!-- begin-user-doc -->
123:          * <!-- end-user-doc -->
124:          *
125:          * @generated
126:          */
127:         @Override
128:         public void eSet(int featureID, Object newValue) {
129:•                switch (featureID) {
130:                 case TestPackage.MAINBOARD__NAME:
131:                         setName((String) newValue);
132:                         return;
133:                 }
134:                 super.eSet(featureID, newValue);
135:         }
136:
137:         /**
138:          * <!-- begin-user-doc -->
139:          * <!-- end-user-doc -->
140:          *
141:          * @generated
142:          */
143:         @Override
144:         public void eUnset(int featureID) {
145:•                switch (featureID) {
146:                 case TestPackage.MAINBOARD__NAME:
147:                         setName(NAME_EDEFAULT);
148:                         return;
149:                 }
150:                 super.eUnset(featureID);
151:         }
152:
153:         /**
154:          * <!-- begin-user-doc -->
155:          * <!-- end-user-doc -->
156:          *
157:          * @generated
158:          */
159:         @Override
160:         public boolean eIsSet(int featureID) {
161:•                switch (featureID) {
162:                 case TestPackage.MAINBOARD__NAME:
163:•                        return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
164:                 }
165:                 return super.eIsSet(featureID);
166:         }
167:
168:         /**
169:          * <!-- begin-user-doc -->
170:          * <!-- end-user-doc -->
171:          *
172:          * @generated
173:          */
174:         @Override
175:         public String toString() {
176:•                if (eIsProxy()) {
177:                         return super.toString();
178:                 }
179:
180:                 final StringBuffer result = new StringBuffer(super.toString());
181:                 result.append(" (name: ");
182:                 result.append(name);
183:                 result.append(')');
184:                 return result.toString();
185:         }
186:
187: } // MainboardImpl