Skip to content

Package: Test3Impl

Test3Impl

nameinstructionbranchcomplexitylinemethod
Test3Impl()
M: 0 C: 24
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eIsSet(int)
M: 0 C: 9
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
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: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getDerived()
M: 0 C: 17
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
isSetDerived()
M: 0 C: 17
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
setDerived(String)
M: 2 C: 14
88%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 2 C: 6
75%
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%
unsetDerived()
M: 2 C: 13
87%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 2 C: 6
75%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2015 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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.common.test.model.impl;
15:
16: import org.eclipse.emf.ecore.EClass;
17: import org.eclipse.emf.ecp.common.spi.DerivedAttributeAdapter;
18: import org.eclipse.emf.ecp.common.test.model.Base;
19: import org.eclipse.emf.ecp.common.test.model.Test3;
20: import org.eclipse.emf.ecp.common.test.model.TestPackage;
21:
22: /**
23: * <!-- begin-user-doc -->
24: * An implementation of the model object '<em><b>Test3</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.common.test.model.impl.Test3Impl#getDerived <em>Derived</em>}</li>
31: * </ul>
32: *
33: * @generated
34: */
35: public class Test3Impl extends BaseImpl implements Test3 {
36:         /**
37:          * The default value of the '{@link #getDerived() <em>Derived</em>}' attribute.
38:          * <!-- begin-user-doc -->
39:          * <!-- end-user-doc -->
40:          *
41:          * @see #getDerived()
42:          * @generated
43:          * @ordered
44:          */
45:         protected static final String DERIVED_EDEFAULT = null;
46:
47:         /**
48:          * <!-- begin-user-doc -->
49:          * <!-- end-user-doc -->
50:          *
51:          * @generated NOT
52:          */
53:         protected Test3Impl() {
54:                 super();
55:                 new DerivedAttributeAdapter(this, TestPackage.eINSTANCE.getTest3_Derived()).addNavigatedDependency(
56:                         TestPackage.eINSTANCE.getBase_SingleAttributeUnsettable(),
57:                         TestPackage.eINSTANCE.getBase_Child(),
58:                         TestPackage.eINSTANCE.getBase_Child());
59:         }
60:
61:         /**
62:          * <!-- begin-user-doc -->
63:          * <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         @Override
68:         protected EClass eStaticClass() {
69:                 return TestPackage.Literals.TEST3;
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated NOT
77:          */
78:         @Override
79:         public String getDerived() {
80:                 final Base child1 = getChild();
81:•                if (child1 == null) {
82:                         return DERIVED_EDEFAULT;
83:                 }
84:                 final Base child2 = child1.getChild();
85:•                if (child2 == null) {
86:                         return DERIVED_EDEFAULT;
87:                 }
88:                 return child2.getSingleAttributeUnsettable();
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated NOT
96:          */
97:         @Override
98:         public void setDerived(String newDerived) {
99:                 final Base child1 = getChild();
100:•                if (child1 == null) {
101:                         return;
102:                 }
103:                 final Base child2 = child1.getChild();
104:•                if (child2 == null) {
105:                         return;
106:                 }
107:                 child2.setSingleAttributeUnsettable(newDerived);
108:         }
109:
110:         /**
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @generated NOT
115:          */
116:         @Override
117:         public void unsetDerived() {
118:                 final Base child1 = getChild();
119:•                if (child1 == null) {
120:                         return;
121:                 }
122:                 final Base child2 = child1.getChild();
123:•                if (child2 == null) {
124:                         return;
125:                 }
126:                 child2.unsetSingleAttributeUnsettable();
127:         }
128:
129:         /**
130:          * <!-- begin-user-doc -->
131:          * <!-- end-user-doc -->
132:          *
133:          * @generated NOT
134:          */
135:         @Override
136:         public boolean isSetDerived() {
137:                 final Base child1 = getChild();
138:•                if (child1 == null) {
139:                         return false;
140:                 }
141:                 final Base child2 = child1.getChild();
142:•                if (child2 == null) {
143:                         return false;
144:                 }
145:                 return child2.isSetSingleAttributeUnsettable();
146:         }
147:
148:         /**
149:          * <!-- begin-user-doc -->
150:          * <!-- end-user-doc -->
151:          *
152:          * @generated
153:          */
154:         @Override
155:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
156:•                switch (featureID) {
157:                 case TestPackage.TEST3__DERIVED:
158:                         return getDerived();
159:                 }
160:                 return super.eGet(featureID, resolve, coreType);
161:         }
162:
163:         /**
164:          * <!-- begin-user-doc -->
165:          * <!-- end-user-doc -->
166:          *
167:          * @generated
168:          */
169:         @Override
170:         public void eSet(int featureID, Object newValue) {
171:•                switch (featureID) {
172:                 case TestPackage.TEST3__DERIVED:
173:                         setDerived((String) newValue);
174:                         return;
175:                 }
176:                 super.eSet(featureID, newValue);
177:         }
178:
179:         /**
180:          * <!-- begin-user-doc -->
181:          * <!-- end-user-doc -->
182:          *
183:          * @generated
184:          */
185:         @Override
186:         public void eUnset(int featureID) {
187:•                switch (featureID) {
188:                 case TestPackage.TEST3__DERIVED:
189:                         unsetDerived();
190:                         return;
191:                 }
192:                 super.eUnset(featureID);
193:         }
194:
195:         /**
196:          * <!-- begin-user-doc -->
197:          * <!-- end-user-doc -->
198:          *
199:          * @generated
200:          */
201:         @Override
202:         public boolean eIsSet(int featureID) {
203:•                switch (featureID) {
204:                 case TestPackage.TEST3__DERIVED:
205:                         return isSetDerived();
206:                 }
207:                 return super.eIsSet(featureID);
208:         }
209:
210: } // Test3Impl