Skip to content

Package: TableContentWithValidationImpl

TableContentWithValidationImpl

nameinstructionbranchcomplexitylinemethod
TableContentWithValidationImpl()
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 10 C: 5
33%
M: 2 C: 1
33%
M: 2 C: 1
33%
M: 2 C: 2
50%
M: 0 C: 1
100%
eIsSet(int)
M: 14 C: 17
55%
M: 5 C: 6
55%
M: 4 C: 3
43%
M: 1 C: 3
75%
M: 0 C: 1
100%
eSet(int, Object)
M: 18 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: 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: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 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%
getWeight()
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%
setName(String)
M: 0 C: 21
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
setWeight(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%
static {...}
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%
toString()
M: 37 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 9 C: 0
0%
M: 1 C: 0
0%

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