Skip to content

Package: TableObjectImpl

TableObjectImpl

nameinstructionbranchcomplexitylinemethod
TableObjectImpl()
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: 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: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getLabel()
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%
setLabel(String)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
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) 2019 Christian W. Damus 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: * Christian W. Damus - 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.TableObject;
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>Table Object</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.TableObjectImpl#getLabel <em>Label</em>}</li>
32: * </ul>
33: *
34: * @generated
35: */
36: public abstract class TableObjectImpl extends EObjectImpl implements TableObject {
37:         /**
38:          * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
39:          * <!-- begin-user-doc -->
40:          * <!-- end-user-doc -->
41:          *
42:          * @see #getLabel()
43:          * @generated
44:          * @ordered
45:          */
46:         protected static final String LABEL_EDEFAULT = null;
47:
48:         /**
49:          * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
50:          * <!-- begin-user-doc -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @see #getLabel()
54:          * @generated
55:          * @ordered
56:          */
57:         protected String label = LABEL_EDEFAULT;
58:
59:         /**
60:          * <!-- begin-user-doc -->
61:          * <!-- end-user-doc -->
62:          *
63:          * @generated
64:          */
65:         protected TableObjectImpl() {
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.TABLE_OBJECT;
78:         }
79:
80:         /**
81:          * <!-- begin-user-doc -->
82:          * <!-- end-user-doc -->
83:          *
84:          * @generated
85:          */
86:         @Override
87:         public String getLabel() {
88:                 return label;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public void setLabel(String newLabel) {
99:                 final String oldLabel = label;
100:                 label = newLabel;
101:•                if (eNotificationRequired()) {
102:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.TABLE_OBJECT__LABEL, oldLabel, label));
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.TABLE_OBJECT__LABEL:
116:                         return getLabel();
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.TABLE_OBJECT__LABEL:
131:                         setLabel((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.TABLE_OBJECT__LABEL:
147:                         setLabel(LABEL_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.TABLE_OBJECT__LABEL:
163:•                        return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
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 StringBuilder result = new StringBuilder(super.toString());
181:                 result.append(" (label: ");
182:                 result.append(label);
183:                 result.append(')');
184:                 return result.toString();
185:         }
186:
187: } // TableObjectImpl