1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.identifier.impl; |
8 | |
9 | import de.uka.ipd.sdq.identifier.*; |
10 | import org.eclipse.emf.ecore.EClass; |
11 | import org.eclipse.emf.ecore.EObject; |
12 | import org.eclipse.emf.ecore.EPackage; |
13 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
14 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
15 | |
16 | import de.uka.ipd.sdq.identifier.IdentifierFactory; |
17 | import de.uka.ipd.sdq.identifier.IdentifierPackage; |
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 IdentifierFactoryImpl extends EFactoryImpl implements IdentifierFactory { |
26 | /** |
27 | * <!-- begin-user-doc --> |
28 | * <!-- end-user-doc --> |
29 | * @generated |
30 | */ |
31 | public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe"; |
32 | |
33 | /** |
34 | * Creates the default factory implementation. |
35 | * <!-- begin-user-doc --> |
36 | * <!-- end-user-doc --> |
37 | * @generated |
38 | */ |
39 | public static IdentifierFactory init() { |
40 | try { |
41 | IdentifierFactory theIdentifierFactory = (IdentifierFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/Identifier/1.0"); |
42 | if (theIdentifierFactory != null) { |
43 | return theIdentifierFactory; |
44 | } |
45 | } |
46 | catch (Exception exception) { |
47 | EcorePlugin.INSTANCE.log(exception); |
48 | } |
49 | return new IdentifierFactoryImpl(); |
50 | } |
51 | |
52 | /** |
53 | * Creates an instance of the factory. |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @generated |
57 | */ |
58 | public IdentifierFactoryImpl() { |
59 | super(); |
60 | } |
61 | |
62 | /** |
63 | * <!-- begin-user-doc --> |
64 | * <!-- end-user-doc --> |
65 | * @generated |
66 | */ |
67 | @Override |
68 | public EObject create(EClass eClass) { |
69 | switch (eClass.getClassifierID()) { |
70 | default: |
71 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
72 | } |
73 | } |
74 | |
75 | /** |
76 | * <!-- begin-user-doc --> |
77 | * <!-- end-user-doc --> |
78 | * @generated |
79 | */ |
80 | public IdentifierPackage getIdentifierPackage() { |
81 | return (IdentifierPackage)getEPackage(); |
82 | } |
83 | |
84 | /** |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @deprecated |
88 | * @generated |
89 | */ |
90 | @Deprecated |
91 | public static IdentifierPackage getPackage() { |
92 | return IdentifierPackage.eINSTANCE; |
93 | } |
94 | |
95 | } //IdentifierFactoryImpl |