Skip to content

Package: FooImpl

FooImpl

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