1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package scheduler.impl; |
8 | |
9 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.EObject; |
11 | import org.eclipse.emf.ecore.EPackage; |
12 | |
13 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
14 | |
15 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
16 | |
17 | import scheduler.*; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model <b>Factory</b>. |
22 | * <!-- end-user-doc --> |
23 | * @generated |
24 | */ |
25 | public class SchedulerFactoryImpl extends EFactoryImpl implements SchedulerFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static SchedulerFactory init() { |
33 | try { |
34 | SchedulerFactory theSchedulerFactory = (SchedulerFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/scheduler/1.0"); |
35 | if (theSchedulerFactory != null) { |
36 | return theSchedulerFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new SchedulerFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public SchedulerFactoryImpl() { |
52 | super(); |
53 | } |
54 | |
55 | /** |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | @Override |
61 | public EObject create(EClass eClass) { |
62 | switch (eClass.getClassifierID()) { |
63 | case SchedulerPackage.SCHEDULER_LIBRARY: return createSchedulerLibrary(); |
64 | case SchedulerPackage.SYSTEM_CONFIGURATION: return createSystemConfiguration(); |
65 | default: |
66 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
67 | } |
68 | } |
69 | |
70 | /** |
71 | * <!-- begin-user-doc --> |
72 | * <!-- end-user-doc --> |
73 | * @generated |
74 | */ |
75 | public SchedulerLibrary createSchedulerLibrary() { |
76 | SchedulerLibraryImpl schedulerLibrary = new SchedulerLibraryImpl(); |
77 | return schedulerLibrary; |
78 | } |
79 | |
80 | /** |
81 | * <!-- begin-user-doc --> |
82 | * <!-- end-user-doc --> |
83 | * @generated |
84 | */ |
85 | public SystemConfiguration createSystemConfiguration() { |
86 | SystemConfigurationImpl systemConfiguration = new SystemConfigurationImpl(); |
87 | return systemConfiguration; |
88 | } |
89 | |
90 | /** |
91 | * <!-- begin-user-doc --> |
92 | * <!-- end-user-doc --> |
93 | * @generated |
94 | */ |
95 | public SchedulerPackage getSchedulerPackage() { |
96 | return (SchedulerPackage)getEPackage(); |
97 | } |
98 | |
99 | /** |
100 | * <!-- begin-user-doc --> |
101 | * <!-- end-user-doc --> |
102 | * @deprecated |
103 | * @generated |
104 | */ |
105 | @Deprecated |
106 | public static SchedulerPackage getPackage() { |
107 | return SchedulerPackage.eINSTANCE; |
108 | } |
109 | |
110 | } //SchedulerFactoryImpl |