Skip to content

Package: UniversityAdapterFactory$1

UniversityAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseAddress(Address)
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%
caseAssistant(Assistant)
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%
caseCourse(Course)
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%
caseCourseCatalog(CourseCatalog)
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%
casePerson(Person)
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%
caseProfessor(Professor)
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%
caseStaff(Staff)
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-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: * EclipseSource - Generated code
13: */
14: package org.eclipse.emf.ecp.test.university.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.test.university.Address;
21: import org.eclipse.emf.ecp.test.university.Assistant;
22: import org.eclipse.emf.ecp.test.university.Course;
23: import org.eclipse.emf.ecp.test.university.CourseCatalog;
24: import org.eclipse.emf.ecp.test.university.Person;
25: import org.eclipse.emf.ecp.test.university.Professor;
26: import org.eclipse.emf.ecp.test.university.Staff;
27: import org.eclipse.emf.ecp.test.university.UniversityPackage;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * The <b>Adapter Factory</b> for the model.
32: * It provides an adapter <code>createXXX</code> method for each class of the model.
33: * <!-- end-user-doc -->
34: *
35: * @see org.eclipse.emf.ecp.test.university.UniversityPackage
36: * @generated
37: */
38: public class UniversityAdapterFactory extends AdapterFactoryImpl {
39:         /**
40:          * The cached model package.
41:          * <!-- begin-user-doc -->
42:          * <!-- end-user-doc -->
43:          *
44:          * @generated
45:          */
46:         protected static UniversityPackage 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 UniversityAdapterFactory() {
56:                 if (modelPackage == null) {
57:                         modelPackage = UniversityPackage.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 UniversitySwitch<Adapter> modelSwitch = new UniversitySwitch<Adapter>() {
90:                 @Override
91:                 public Adapter caseCourseCatalog(CourseCatalog object) {
92:                         return createCourseCatalogAdapter();
93:                 }
94:
95:                 @Override
96:                 public Adapter caseCourse(Course object) {
97:                         return createCourseAdapter();
98:                 }
99:
100:                 @Override
101:                 public Adapter caseStaff(Staff object) {
102:                         return createStaffAdapter();
103:                 }
104:
105:                 @Override
106:                 public Adapter caseProfessor(Professor object) {
107:                         return createProfessorAdapter();
108:                 }
109:
110:                 @Override
111:                 public Adapter caseAssistant(Assistant object) {
112:                         return createAssistantAdapter();
113:                 }
114:
115:                 @Override
116:                 public Adapter casePerson(Person object) {
117:                         return createPersonAdapter();
118:                 }
119:
120:                 @Override
121:                 public Adapter caseAddress(Address object) {
122:                         return createAddressAdapter();
123:                 }
124:
125:                 @Override
126:                 public Adapter defaultCase(EObject object) {
127:                         return createEObjectAdapter();
128:                 }
129:         };
130:
131:         /**
132:          * Creates an adapter for the <code>target</code>.
133:          * <!-- begin-user-doc -->
134:          * <!-- end-user-doc -->
135:          *
136:          * @param target the object to adapt.
137:          * @return the adapter for the <code>target</code>.
138:          * @generated
139:          */
140:         @Override
141:         public Adapter createAdapter(Notifier target) {
142:                 return modelSwitch.doSwitch((EObject) target);
143:         }
144:
145:         /**
146:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.CourseCatalog
147:          * <em>Course Catalog</em>}'.
148:          * <!-- begin-user-doc -->
149:          * This default implementation returns null so that we can easily ignore cases;
150:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
151:          * <!-- end-user-doc -->
152:          *
153:          * @return the new adapter.
154:          * @see org.eclipse.emf.ecp.test.university.CourseCatalog
155:          * @generated
156:          */
157:         public Adapter createCourseCatalogAdapter() {
158:                 return null;
159:         }
160:
161:         /**
162:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Course <em>Course</em>}
163:          * '.
164:          * <!-- begin-user-doc -->
165:          * This default implementation returns null so that we can easily ignore cases;
166:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
167:          * <!-- end-user-doc -->
168:          *
169:          * @return the new adapter.
170:          * @see org.eclipse.emf.ecp.test.university.Course
171:          * @generated
172:          */
173:         public Adapter createCourseAdapter() {
174:                 return null;
175:         }
176:
177:         /**
178:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Staff <em>Staff</em>}'.
179:          * <!-- begin-user-doc -->
180:          * This default implementation returns null so that we can easily ignore cases;
181:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
182:          * <!-- end-user-doc -->
183:          *
184:          * @return the new adapter.
185:          * @see org.eclipse.emf.ecp.test.university.Staff
186:          * @generated
187:          */
188:         public Adapter createStaffAdapter() {
189:                 return null;
190:         }
191:
192:         /**
193:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Professor
194:          * <em>Professor</em>}'.
195:          * <!-- begin-user-doc -->
196:          * This default implementation returns null so that we can easily ignore cases;
197:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
198:          * <!-- end-user-doc -->
199:          *
200:          * @return the new adapter.
201:          * @see org.eclipse.emf.ecp.test.university.Professor
202:          * @generated
203:          */
204:         public Adapter createProfessorAdapter() {
205:                 return null;
206:         }
207:
208:         /**
209:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Assistant
210:          * <em>Assistant</em>}'.
211:          * <!-- begin-user-doc -->
212:          * This default implementation returns null so that we can easily ignore cases;
213:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
214:          * <!-- end-user-doc -->
215:          *
216:          * @return the new adapter.
217:          * @see org.eclipse.emf.ecp.test.university.Assistant
218:          * @generated
219:          */
220:         public Adapter createAssistantAdapter() {
221:                 return null;
222:         }
223:
224:         /**
225:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Person <em>Person</em>}
226:          * '.
227:          * <!-- begin-user-doc -->
228:          * This default implementation returns null so that we can easily ignore cases;
229:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
230:          * <!-- end-user-doc -->
231:          *
232:          * @return the new adapter.
233:          * @see org.eclipse.emf.ecp.test.university.Person
234:          * @generated
235:          */
236:         public Adapter createPersonAdapter() {
237:                 return null;
238:         }
239:
240:         /**
241:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.test.university.Address <em>Address</em>
242:          * }'.
243:          * <!-- begin-user-doc -->
244:          * This default implementation returns null so that we can easily ignore cases;
245:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
246:          * <!-- end-user-doc -->
247:          *
248:          * @return the new adapter.
249:          * @see org.eclipse.emf.ecp.test.university.Address
250:          * @generated
251:          */
252:         public Adapter createAddressAdapter() {
253:                 return null;
254:         }
255:
256:         /**
257:          * Creates a new adapter for the default case.
258:          * <!-- begin-user-doc -->
259:          * This default implementation returns null.
260:          * <!-- end-user-doc -->
261:          *
262:          * @return the new adapter.
263:          * @generated
264:          */
265:         public Adapter createEObjectAdapter() {
266:                 return null;
267:         }
268:
269: } // UniversityAdapterFactory