Skip to content

Package: CompoundcontrolAdapterFactory$1

CompoundcontrolAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseCompoundControl(VCompoundControl)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseContainedElement(VContainedElement)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseControl(VControl)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseElement(VElement)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
defaultCase(EObject)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
{...}
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

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.spi.compoundcontrol.model.util;
15:
16: import org.eclipse.emf.common.notify.Adapter;
17: import org.eclipse.emf.common.notify.Notifier;
18: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundControl;
21: import org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundcontrolPackage;
22: import org.eclipse.emf.ecp.view.spi.model.VContainedElement;
23: import org.eclipse.emf.ecp.view.spi.model.VControl;
24: import org.eclipse.emf.ecp.view.spi.model.VElement;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * The <b>Adapter Factory</b> for the model.
29: * It provides an adapter <code>createXXX</code> method for each class of the model.
30: * <!-- end-user-doc -->
31: *
32: * @see org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundcontrolPackage
33: * @generated
34: */
35: public class CompoundcontrolAdapterFactory extends AdapterFactoryImpl {
36:         /**
37:          * The cached model package.
38:          * <!-- begin-user-doc -->
39:          * <!-- end-user-doc -->
40:          *
41:          * @generated
42:          */
43:         protected static VCompoundcontrolPackage modelPackage;
44:
45:         /**
46:          * Creates an instance of the adapter factory.
47:          * <!-- begin-user-doc -->
48:          * <!-- end-user-doc -->
49:          *
50:          * @generated
51:          */
52:         public CompoundcontrolAdapterFactory() {
53:                 if (modelPackage == null) {
54:                         modelPackage = VCompoundcontrolPackage.eINSTANCE;
55:                 }
56:         }
57:
58:         /**
59:          * Returns whether this factory is applicable for the type of the object.
60:          * <!-- begin-user-doc -->
61:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
62:          * object of the model.
63:          * <!-- end-user-doc -->
64:          *
65:          * @return whether this factory is applicable for the type of the object.
66:          * @generated
67:          */
68:         @Override
69:         public boolean isFactoryForType(Object object) {
70:                 if (object == modelPackage) {
71:                         return true;
72:                 }
73:                 if (object instanceof EObject) {
74:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
75:                 }
76:                 return false;
77:         }
78:
79:         /**
80:          * The switch that delegates to the <code>createXXX</code> methods.
81:          * <!-- begin-user-doc -->
82:          * <!-- end-user-doc -->
83:          *
84:          * @generated
85:          */
86:         protected CompoundcontrolSwitch<Adapter> modelSwitch = new CompoundcontrolSwitch<Adapter>() {
87:                 @Override
88:                 public Adapter caseCompoundControl(VCompoundControl object) {
89:                         return createCompoundControlAdapter();
90:                 }
91:
92:                 @Override
93:                 public Adapter caseElement(VElement object) {
94:                         return createElementAdapter();
95:                 }
96:
97:                 @Override
98:                 public Adapter caseContainedElement(VContainedElement object) {
99:                         return createContainedElementAdapter();
100:                 }
101:
102:                 @Override
103:                 public Adapter caseControl(VControl object) {
104:                         return createControlAdapter();
105:                 }
106:
107:                 @Override
108:                 public Adapter defaultCase(EObject object) {
109:                         return createEObjectAdapter();
110:                 }
111:         };
112:
113:         /**
114:          * Creates an adapter for the <code>target</code>.
115:          * <!-- begin-user-doc -->
116:          * <!-- end-user-doc -->
117:          *
118:          * @param target the object to adapt.
119:          * @return the adapter for the <code>target</code>.
120:          * @generated
121:          */
122:         @Override
123:         public Adapter createAdapter(Notifier target) {
124:                 return modelSwitch.doSwitch((EObject) target);
125:         }
126:
127:         /**
128:          * Creates a new adapter for an object of class '
129:          * {@link org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundControl <em>Compound Control</em>}'.
130:          * <!-- begin-user-doc -->
131:          * This default implementation returns null so that we can easily ignore cases;
132:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
133:          * <!-- end-user-doc -->
134:          *
135:          * @return the new adapter.
136:          * @see org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundControl
137:          * @generated
138:          */
139:         public Adapter createCompoundControlAdapter() {
140:                 return null;
141:         }
142:
143:         /**
144:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VElement <em>Element</em>
145:          * }'.
146:          * <!-- begin-user-doc -->
147:          * This default implementation returns null so that we can easily ignore cases;
148:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
149:          * <!-- end-user-doc -->
150:          *
151:          * @return the new adapter.
152:          * @see org.eclipse.emf.ecp.view.spi.model.VElement
153:          * @generated
154:          */
155:         public Adapter createElementAdapter() {
156:                 return null;
157:         }
158:
159:         /**
160:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VContainedElement
161:          * <em>Contained Element</em>}'.
162:          * <!-- begin-user-doc -->
163:          * This default implementation returns null so that we can easily ignore cases;
164:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
165:          * <!-- end-user-doc -->
166:          *
167:          * @return the new adapter.
168:          * @see org.eclipse.emf.ecp.view.spi.model.VContainedElement
169:          * @generated
170:          */
171:         public Adapter createContainedElementAdapter() {
172:                 return null;
173:         }
174:
175:         /**
176:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VControl <em>Control</em>
177:          * }'.
178:          * <!-- begin-user-doc -->
179:          * This default implementation returns null so that we can easily ignore cases;
180:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
181:          *
182:          * @since 1.8
183:          * <!-- end-user-doc -->
184:          *
185:          * @return the new adapter.
186:          * @see org.eclipse.emf.ecp.view.spi.model.VControl
187:          * @generated
188:          */
189:         public Adapter createControlAdapter() {
190:                 return null;
191:         }
192:
193:         /**
194:          * Creates a new adapter for the default case.
195:          * <!-- begin-user-doc -->
196:          * This default implementation returns null.
197:          * <!-- end-user-doc -->
198:          *
199:          * @return the new adapter.
200:          * @generated
201:          */
202:         public Adapter createEObjectAdapter() {
203:                 return null;
204:         }
205:
206: } // CompoundcontrolAdapterFactory