Skip to content

Package: ChildLevel2Impl

ChildLevel2Impl

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