Skip to content

Package: HorizontalAdapterFactory$1

HorizontalAdapterFactory$1

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