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