Skip to content

Package: CategorizationAdapterFactory$1

CategorizationAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseAbstractCategorization(VAbstractCategorization)
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%
caseAction(VAction)
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%
caseCategorizableElement(VCategorizableElement)
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%
caseCategorization(VCategorization)
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%
caseCategorizationElement(VCategorizationElement)
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%
caseCategory(VCategory)
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%
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%
caseHasTooltip(VHasTooltip)
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: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
{...}
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-2013 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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.categorization.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.categorization.model.VAbstractCategorization;
21: import org.eclipse.emf.ecp.view.spi.categorization.model.VAction;
22: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement;
23: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorization;
24: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationElement;
25: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage;
26: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategory;
27: import org.eclipse.emf.ecp.view.spi.model.VContainedElement;
28: import org.eclipse.emf.ecp.view.spi.model.VElement;
29: import org.eclipse.emf.ecp.view.spi.model.VHasTooltip;
30:
31: /**
32: * <!-- begin-user-doc -->
33: * The <b>Adapter Factory</b> for the model.
34: * It provides an adapter <code>createXXX</code> method for each class of the model.
35: * <!-- end-user-doc -->
36: *
37: * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage
38: * @generated
39: */
40: public class CategorizationAdapterFactory extends AdapterFactoryImpl {
41:         /**
42:          * The cached model package.
43:          * <!-- begin-user-doc -->
44:          * <!-- end-user-doc -->
45:          *
46:          * @generated
47:          */
48:         protected static VCategorizationPackage modelPackage;
49:
50:         /**
51:          * Creates an instance of the adapter factory.
52:          * <!-- begin-user-doc -->
53:          * <!-- end-user-doc -->
54:          *
55:          * @generated
56:          */
57:         public CategorizationAdapterFactory() {
58:                 if (modelPackage == null) {
59:                         modelPackage = VCategorizationPackage.eINSTANCE;
60:                 }
61:         }
62:
63:         /**
64:          * Returns whether this factory is applicable for the type of the object.
65:          * <!-- begin-user-doc -->
66:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
67:          * object of the model.
68:          * <!-- end-user-doc -->
69:          *
70:          * @return whether this factory is applicable for the type of the object.
71:          * @generated
72:          */
73:         @Override
74:         public boolean isFactoryForType(Object object) {
75:                 if (object == modelPackage) {
76:                         return true;
77:                 }
78:                 if (object instanceof EObject) {
79:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
80:                 }
81:                 return false;
82:         }
83:
84:         /**
85:          * The switch that delegates to the <code>createXXX</code> methods.
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         protected CategorizationSwitch<Adapter> modelSwitch = new CategorizationSwitch<Adapter>() {
92:                 @Override
93:                 public Adapter caseAbstractCategorization(VAbstractCategorization object) {
94:                         return createAbstractCategorizationAdapter();
95:                 }
96:
97:                 @Override
98:                 public Adapter caseCategorization(VCategorization object) {
99:                         return createCategorizationAdapter();
100:                 }
101:
102:                 @Override
103:                 public Adapter caseCategory(VCategory object) {
104:                         return createCategoryAdapter();
105:                 }
106:
107:                 @Override
108:                 public Adapter caseAction(VAction object) {
109:                         return createActionAdapter();
110:                 }
111:
112:                 @Override
113:                 public Adapter caseCategorizationElement(VCategorizationElement object) {
114:                         return createCategorizationElementAdapter();
115:                 }
116:
117:                 @Override
118:                 public Adapter caseCategorizableElement(VCategorizableElement object) {
119:                         return createCategorizableElementAdapter();
120:                 }
121:
122:                 @Override
123:                 public Adapter caseElement(VElement object) {
124:                         return createElementAdapter();
125:                 }
126:
127:                 @Override
128:                 public Adapter caseHasTooltip(VHasTooltip object) {
129:                         return createHasTooltipAdapter();
130:                 }
131:
132:                 @Override
133:                 public Adapter caseContainedElement(VContainedElement object) {
134:                         return createContainedElementAdapter();
135:                 }
136:
137:                 @Override
138:                 public Adapter defaultCase(EObject object) {
139:                         return createEObjectAdapter();
140:                 }
141:         };
142:
143:         /**
144:          * Creates an adapter for the <code>target</code>.
145:          * <!-- begin-user-doc -->
146:          * <!-- end-user-doc -->
147:          *
148:          * @param target the object to adapt.
149:          * @return the adapter for the <code>target</code>.
150:          * @generated
151:          */
152:         @Override
153:         public Adapter createAdapter(Notifier target) {
154:                 return modelSwitch.doSwitch((EObject) target);
155:         }
156:
157:         /**
158:          * Creates a new adapter for an object of class
159:          * '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization <em>Abstract
160:          * Categorization</em>}'.
161:          * <!-- begin-user-doc -->
162:          * This default implementation returns null so that we can easily ignore cases;
163:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
164:          * <!-- end-user-doc -->
165:          *
166:          * @return the new adapter.
167:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization
168:          * @generated
169:          */
170:         public Adapter createAbstractCategorizationAdapter() {
171:                 return null;
172:         }
173:
174:         /**
175:          * Creates a new adapter for an object of class
176:          * '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategorization <em>Categorization</em>}'.
177:          * <!-- begin-user-doc -->
178:          * This default implementation returns null so that we can easily ignore cases;
179:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
180:          * <!-- end-user-doc -->
181:          *
182:          * @return the new adapter.
183:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorization
184:          * @generated
185:          */
186:         public Adapter createCategorizationAdapter() {
187:                 return null;
188:         }
189:
190:         /**
191:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategory
192:          * <em>Category</em>}'.
193:          * <!-- begin-user-doc -->
194:          * This default implementation returns null so that we can easily ignore cases;
195:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
196:          * <!-- end-user-doc -->
197:          *
198:          * @return the new adapter.
199:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategory
200:          * @generated
201:          */
202:         public Adapter createCategoryAdapter() {
203:                 return null;
204:         }
205:
206:         /**
207:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VAction
208:          * <em>Action</em>}'.
209:          * <!-- begin-user-doc -->
210:          * This default implementation returns null so that we can easily ignore cases;
211:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
212:          * <!-- end-user-doc -->
213:          *
214:          * @return the new adapter.
215:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VAction
216:          * @generated
217:          */
218:         public Adapter createActionAdapter() {
219:                 return null;
220:         }
221:
222:         /**
223:          * Creates a new adapter for an object of class
224:          * '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationElement <em>Element</em>}'.
225:          * <!-- begin-user-doc -->
226:          * This default implementation returns null so that we can easily ignore cases;
227:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
228:          * <!-- end-user-doc -->
229:          *
230:          * @return the new adapter.
231:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationElement
232:          * @generated
233:          */
234:         public Adapter createCategorizationElementAdapter() {
235:                 return null;
236:         }
237:
238:         /**
239:          * Creates a new adapter for an object of class
240:          * '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement <em>Categorizable Element</em>}'.
241:          * <!-- begin-user-doc -->
242:          * This default implementation returns null so that we can easily ignore cases;
243:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
244:          * <!-- end-user-doc -->
245:          *
246:          * @return the new adapter.
247:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement
248:          * @generated
249:          */
250:         public Adapter createCategorizableElementAdapter() {
251:                 return null;
252:         }
253:
254:         /**
255:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VElement
256:          * <em>Element</em>}'.
257:          * <!-- begin-user-doc -->
258:          * This default implementation returns null so that we can easily ignore cases;
259:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
260:          * <!-- end-user-doc -->
261:          *
262:          * @return the new adapter.
263:          * @see org.eclipse.emf.ecp.view.spi.model.VElement
264:          * @generated
265:          */
266:         public Adapter createElementAdapter() {
267:                 return null;
268:         }
269:
270:         /**
271:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VHasTooltip <em>Has
272:          * Tooltip</em>}'.
273:          * <!-- begin-user-doc -->
274:          * This default implementation returns null so that we can easily ignore cases;
275:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
276:          *
277:          * @since 1.13
278:          * <!-- end-user-doc -->
279:          *
280:          * @return the new adapter.
281:          * @see org.eclipse.emf.ecp.view.spi.model.VHasTooltip
282:          * @generated
283:          */
284:         public Adapter createHasTooltipAdapter() {
285:                 return null;
286:         }
287:
288:         /**
289:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VContainedElement
290:          * <em>Contained Element</em>}'.
291:          * <!-- begin-user-doc -->
292:          * This default implementation returns null so that we can easily ignore cases;
293:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
294:          * <!-- end-user-doc -->
295:          *
296:          * @return the new adapter.
297:          * @see org.eclipse.emf.ecp.view.spi.model.VContainedElement
298:          * @generated
299:          */
300:         public Adapter createContainedElementAdapter() {
301:                 return null;
302:         }
303:
304:         /**
305:          * Creates a new adapter for the default case.
306:          * <!-- begin-user-doc -->
307:          * This default implementation returns null.
308:          * <!-- end-user-doc -->
309:          *
310:          * @return the new adapter.
311:          * @generated
312:          */
313:         public Adapter createEObjectAdapter() {
314:                 return null;
315:         }
316:
317: } // CategorizationAdapterFactory