Skip to content

Package: ContainerImpl

ContainerImpl

nameinstructionbranchcomplexitylinemethod
ContainerImpl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
eGet(int, boolean, boolean)
M: 17 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 15 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: 17 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eSet(int, Object)
M: 13 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%
getChildren()
M: 15 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.mapping.test.example.impl;
15:
16: import org.eclipse.emf.common.notify.NotificationChain;
17: import org.eclipse.emf.common.util.EMap;
18: import org.eclipse.emf.ecore.EClass;
19: import org.eclipse.emf.ecore.EStructuralFeature;
20: import org.eclipse.emf.ecore.InternalEObject;
21: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22: import org.eclipse.emf.ecore.util.EcoreEMap;
23: import org.eclipse.emf.ecore.util.InternalEList;
24: import org.eclipse.emf.ecp.view.mapping.test.example.AbstractChild;
25: import org.eclipse.emf.ecp.view.mapping.test.example.ExamplePackage;
26:
27: /**
28: * <!-- begin-user-doc -->
29: * An implementation of the model object '<em><b>Container</b></em>'.
30: * <!-- end-user-doc -->
31: * <p>
32: * The following features are implemented:
33: * <ul>
34: * <li>{@link org.eclipse.emf.ecp.view.mapping.test.example.impl.ContainerImpl#getChildren <em>Children</em>}</li>
35: * </ul>
36: * </p>
37: *
38: * @generated
39: */
40: public class ContainerImpl extends MinimalEObjectImpl.Container implements
41:         org.eclipse.emf.ecp.view.mapping.test.example.Container {
42:         /**
43:          * The cached value of the '{@link #getChildren() <em>Children</em>}' map.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getChildren()
48:          * @generated
49:          * @ordered
50:          */
51:         protected EMap<EClass, AbstractChild> children;
52:
53:         /**
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         protected ContainerImpl() {
60:                 super();
61:         }
62:
63:         /**
64:          * <!-- begin-user-doc -->
65:          * <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         @Override
70:         protected EClass eStaticClass() {
71:                 return ExamplePackage.Literals.CONTAINER;
72:         }
73:
74:         /**
75:          * <!-- begin-user-doc -->
76:          * <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         @Override
81:         public EMap<EClass, AbstractChild> getChildren() {
82:•                if (children == null) {
83:                         children = new EcoreEMap<EClass, AbstractChild>(ExamplePackage.Literals.ECLASS_TO_ADDITION_MAP,
84:                                 EClassToAdditionMapImpl.class, this, ExamplePackage.CONTAINER__CHILDREN);
85:                 }
86:                 return children;
87:         }
88:
89:         /**
90:          * <!-- begin-user-doc -->
91:          * <!-- end-user-doc -->
92:          *
93:          * @generated
94:          */
95:         @Override
96:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
97:•                switch (featureID) {
98:                 case ExamplePackage.CONTAINER__CHILDREN:
99:                         return ((InternalEList<?>) getChildren()).basicRemove(otherEnd, msgs);
100:                 }
101:                 return super.eInverseRemove(otherEnd, featureID, msgs);
102:         }
103:
104:         /**
105:          * <!-- begin-user-doc -->
106:          * <!-- end-user-doc -->
107:          *
108:          * @generated
109:          */
110:         @Override
111:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
112:•                switch (featureID) {
113:                 case ExamplePackage.CONTAINER__CHILDREN:
114:•                        if (coreType) {
115:                                 return getChildren();
116:                         }
117:                         return getChildren().map();
118:
119:                 }
120:                 return super.eGet(featureID, resolve, coreType);
121:         }
122:
123:         /**
124:          * <!-- begin-user-doc -->
125:          * <!-- end-user-doc -->
126:          *
127:          * @generated
128:          */
129:         @Override
130:         public void eSet(int featureID, Object newValue) {
131:•                switch (featureID) {
132:                 case ExamplePackage.CONTAINER__CHILDREN:
133:                         ((EStructuralFeature.Setting) getChildren()).set(newValue);
134:                         return;
135:                 }
136:                 super.eSet(featureID, newValue);
137:         }
138:
139:         /**
140:          * <!-- begin-user-doc -->
141:          * <!-- end-user-doc -->
142:          *
143:          * @generated
144:          */
145:         @Override
146:         public void eUnset(int featureID) {
147:•                switch (featureID) {
148:                 case ExamplePackage.CONTAINER__CHILDREN:
149:                         getChildren().clear();
150:                         return;
151:                 }
152:                 super.eUnset(featureID);
153:         }
154:
155:         /**
156:          * <!-- begin-user-doc -->
157:          * <!-- end-user-doc -->
158:          *
159:          * @generated
160:          */
161:         @Override
162:         public boolean eIsSet(int featureID) {
163:•                switch (featureID) {
164:                 case ExamplePackage.CONTAINER__CHILDREN:
165:•                        return children != null && !children.isEmpty();
166:                 }
167:                 return super.eIsSet(featureID);
168:         }
169:
170: } // ContainerImpl