Skip to content

Package: TargetImpl

TargetImpl

nameinstructionbranchcomplexitylinemethod
TargetImpl()
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%
getName()
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%
setName(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-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.index.test.example.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.index.test.example.ExamplePackage;
21: import org.eclipse.emf.ecp.view.index.test.example.Target;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>Target</b></em>'.
26: * <!-- end-user-doc -->
27: * <p>
28: * The following features are implemented:
29: * <ul>
30: * <li>{@link org.eclipse.emf.ecp.view.index.test.example.impl.TargetImpl#getName <em>Name</em>}</li>
31: * </ul>
32: * </p>
33: *
34: * @generated
35: */
36: public class TargetImpl extends MinimalEObjectImpl.Container implements Target {
37:         /**
38:          * The default value of the '{@link #getName() <em>Name</em>}' attribute.
39:          * <!-- begin-user-doc -->
40:          * <!-- 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 -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @see #getName()
54:          * @generated
55:          * @ordered
56:          */
57:         protected String name = NAME_EDEFAULT;
58:
59:         /**
60:          * <!-- begin-user-doc -->
61:          * <!-- end-user-doc -->
62:          *
63:          * @generated
64:          */
65:         protected TargetImpl() {
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 ExamplePackage.Literals.TARGET;
78:         }
79:
80:         /**
81:          * <!-- begin-user-doc -->
82:          * <!-- end-user-doc -->
83:          *
84:          * @generated
85:          */
86:         @Override
87:         public String getName() {
88:                 return name;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public void setName(String newName) {
99:                 final String oldName = name;
100:                 name = newName;
101:•                if (eNotificationRequired()) {
102:                         eNotify(new ENotificationImpl(this, Notification.SET, ExamplePackage.TARGET__NAME, oldName, name));
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 ExamplePackage.TARGET__NAME:
116:                         return getName();
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 ExamplePackage.TARGET__NAME:
131:                         setName((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 ExamplePackage.TARGET__NAME:
147:                         setName(NAME_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 ExamplePackage.TARGET__NAME:
163:•                        return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
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 StringBuffer result = new StringBuffer(super.toString());
181:                 result.append(" (name: "); //$NON-NLS-1$
182:                 result.append(name);
183:                 result.append(')');
184:                 return result.toString();
185:         }
186:
187: } // TargetImpl