Skip to content

Package: ControlgridAdapterFactory$1

ControlgridAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
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%
caseControlGrid(VControlGrid)
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%
caseControlGridCell(VControlGridCell)
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%
caseControlGridRow(VControlGridRow)
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: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

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