Skip to content

Package: IndexsegmentAdapterFactory$1

IndexsegmentAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseDomainModelReferenceSegment(VDomainModelReferenceSegment)
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%
caseFeatureDomainModelReferenceSegment(VFeatureDomainModelReferenceSegment)
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%
caseIndexDomainModelReferenceSegment(VIndexDomainModelReferenceSegment)
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-2018 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: * Lucas Koehler - initial API and implementation
13: */
14: package org.eclipse.emfforms.spi.view.indexsegment.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.VDomainModelReferenceSegment;
21: import org.eclipse.emf.ecp.view.spi.model.VFeatureDomainModelReferenceSegment;
22: import org.eclipse.emfforms.spi.view.indexsegment.model.VIndexDomainModelReferenceSegment;
23: import org.eclipse.emfforms.spi.view.indexsegment.model.VIndexsegmentPackage;
24:
25: /**
26: * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
27: * an adapter <code>createXXX</code> method for each class of the model. <!--
28: * end-user-doc -->
29: *
30: * @see org.eclipse.emfforms.spi.view.indexsegment.model.VIndexsegmentPackage
31: * @generated
32: */
33: public class IndexsegmentAdapterFactory extends AdapterFactoryImpl {
34:         /**
35:          * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
36:          *
37:          * @generated
38:          */
39:         protected static VIndexsegmentPackage modelPackage;
40:
41:         /**
42:          * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!--
43:          * end-user-doc -->
44:          *
45:          * @generated
46:          */
47:         public IndexsegmentAdapterFactory() {
48:                 if (modelPackage == null) {
49:                         modelPackage = VIndexsegmentPackage.eINSTANCE;
50:                 }
51:         }
52:
53:         /**
54:          * Returns whether this factory is applicable for the type of the object. <!--
55:          * begin-user-doc --> This implementation returns <code>true</code> if the
56:          * object is either the model's package or is an instance object of the model.
57:          * <!-- end-user-doc -->
58:          *
59:          * @return whether this factory is applicable for the type of the object.
60:          * @generated
61:          */
62:         @Override
63:         public boolean isFactoryForType(Object object) {
64:                 if (object == modelPackage) {
65:                         return true;
66:                 }
67:                 if (object instanceof EObject) {
68:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
69:                 }
70:                 return false;
71:         }
72:
73:         /**
74:          * The switch that delegates to the <code>createXXX</code> methods. <!--
75:          * begin-user-doc --> <!-- end-user-doc -->
76:          *
77:          * @generated
78:          */
79:         protected IndexsegmentSwitch<Adapter> modelSwitch = new IndexsegmentSwitch<Adapter>() {
80:                 @Override
81:                 public Adapter caseIndexDomainModelReferenceSegment(VIndexDomainModelReferenceSegment object) {
82:                         return createIndexDomainModelReferenceSegmentAdapter();
83:                 }
84:
85:                 @Override
86:                 public Adapter caseDomainModelReferenceSegment(VDomainModelReferenceSegment object) {
87:                         return createDomainModelReferenceSegmentAdapter();
88:                 }
89:
90:                 @Override
91:                 public Adapter caseFeatureDomainModelReferenceSegment(VFeatureDomainModelReferenceSegment object) {
92:                         return createFeatureDomainModelReferenceSegmentAdapter();
93:                 }
94:
95:                 @Override
96:                 public Adapter defaultCase(EObject object) {
97:                         return createEObjectAdapter();
98:                 }
99:         };
100:
101:         /**
102:          * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!--
103:          * end-user-doc -->
104:          *
105:          * @param target the object to adapt.
106:          * @return the adapter for the <code>target</code>.
107:          * @generated
108:          */
109:         @Override
110:         public Adapter createAdapter(Notifier target) {
111:                 return modelSwitch.doSwitch((EObject) target);
112:         }
113:
114:         /**
115:          * Creates a new adapter for an object of class
116:          * '{@link org.eclipse.emfforms.spi.view.indexsegment.model.VIndexDomainModelReferenceSegment
117:          * <em>Index Domain Model Reference Segment</em>}'. <!-- begin-user-doc --> This
118:          * default implementation returns null so that we can easily ignore cases; it's
119:          * useful to ignore a case when inheritance will catch all the cases anyway.
120:          * <!-- end-user-doc -->
121:          *
122:          * @return the new adapter.
123:          * @see org.eclipse.emfforms.spi.view.indexsegment.model.VIndexDomainModelReferenceSegment
124:          * @generated
125:          */
126:         public Adapter createIndexDomainModelReferenceSegmentAdapter() {
127:                 return null;
128:         }
129:
130:         /**
131:          * Creates a new adapter for an object of class
132:          * '{@link org.eclipse.emf.ecp.view.spi.model.VDomainModelReferenceSegment
133:          * <em>Domain Model Reference Segment</em>}'. <!-- begin-user-doc --> This
134:          * default implementation returns null so that we can easily ignore cases; it's
135:          * useful to ignore a case when inheritance will catch all the cases anyway.
136:          * <!-- end-user-doc -->
137:          *
138:          * @return the new adapter.
139:          * @see org.eclipse.emf.ecp.view.spi.model.VDomainModelReferenceSegment
140:          * @generated
141:          */
142:         public Adapter createDomainModelReferenceSegmentAdapter() {
143:                 return null;
144:         }
145:
146:         /**
147:          * Creates a new adapter for an object of class
148:          * '{@link org.eclipse.emf.ecp.view.spi.model.VFeatureDomainModelReferenceSegment
149:          * <em>Feature Domain Model Reference Segment</em>}'. <!-- begin-user-doc -->
150:          * This default implementation returns null so that we can easily ignore cases;
151:          * it's useful to ignore a case when inheritance will catch all the cases
152:          * anyway. <!-- end-user-doc -->
153:          *
154:          * @return the new adapter.
155:          * @see org.eclipse.emf.ecp.view.spi.model.VFeatureDomainModelReferenceSegment
156:          * @generated
157:          */
158:         public Adapter createFeatureDomainModelReferenceSegmentAdapter() {
159:                 return null;
160:         }
161:
162:         /**
163:          * Creates a new adapter for the default case. <!-- begin-user-doc --> This
164:          * default implementation returns null. <!-- end-user-doc -->
165:          *
166:          * @return the new adapter.
167:          * @generated
168:          */
169:         public Adapter createEObjectAdapter() {
170:                 return null;
171:         }
172:
173: } // IndexsegmentAdapterFactory