aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java')
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java219
1 files changed, 219 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java
new file mode 100644
index 00000000..5c2a9c51
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java
@@ -0,0 +1,219 @@
1/**
2 */
3package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl;
4
5import org.eclipse.emf.ecore.EClass;
6import org.eclipse.emf.ecore.EDataType;
7import org.eclipse.emf.ecore.EObject;
8import org.eclipse.emf.ecore.EPackage;
9import org.eclipse.emf.ecore.impl.EFactoryImpl;
10import org.eclipse.emf.ecore.plugin.EcorePlugin;
11
12import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator;
13import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function;
14import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType;
15import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel;
16import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput;
17import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface;
18import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput;
19import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink;
20import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famFactory;
21import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage;
22
23/**
24 * <!-- begin-user-doc -->
25 * An implementation of the model <b>Factory</b>.
26 * <!-- end-user-doc -->
27 * @generated
28 */
29public class famFactoryImpl extends EFactoryImpl implements famFactory {
30 /**
31 * Creates the default factory implementation.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36 public static famFactory init() {
37 try {
38 famFactory thefamFactory = (famFactory)EPackage.Registry.INSTANCE.getEFactory(famPackage.eNS_URI);
39 if (thefamFactory != null) {
40 return thefamFactory;
41 }
42 }
43 catch (Exception exception) {
44 EcorePlugin.INSTANCE.log(exception);
45 }
46 return new famFactoryImpl();
47 }
48
49 /**
50 * Creates an instance of the factory.
51 * <!-- begin-user-doc -->
52 * <!-- end-user-doc -->
53 * @generated
54 */
55 public famFactoryImpl() {
56 super();
57 }
58
59 /**
60 * <!-- begin-user-doc -->
61 * <!-- end-user-doc -->
62 * @generated
63 */
64 @Override
65 public EObject create(EClass eClass) {
66 switch (eClass.getClassifierID()) {
67 case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL: return createFunctionalArchitectureModel();
68 case famPackage.FUNCTION: return createFunction();
69 case famPackage.FAM_TERMINATOR: return createFAMTerminator();
70 case famPackage.INFORMATION_LINK: return createInformationLink();
71 case famPackage.FUNCTIONAL_INTERFACE: return createFunctionalInterface();
72 case famPackage.FUNCTIONAL_INPUT: return createFunctionalInput();
73 case famPackage.FUNCTIONAL_OUTPUT: return createFunctionalOutput();
74 default:
75 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
76 }
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 @Override
85 public Object createFromString(EDataType eDataType, String initialValue) {
86 switch (eDataType.getClassifierID()) {
87 case famPackage.FUNCTION_TYPE:
88 return createFunctionTypeFromString(eDataType, initialValue);
89 default:
90 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
91 }
92 }
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 @Override
100 public String convertToString(EDataType eDataType, Object instanceValue) {
101 switch (eDataType.getClassifierID()) {
102 case famPackage.FUNCTION_TYPE:
103 return convertFunctionTypeToString(eDataType, instanceValue);
104 default:
105 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
106 }
107 }
108
109 /**
110 * <!-- begin-user-doc -->
111 * <!-- end-user-doc -->
112 * @generated
113 */
114 public FunctionalArchitectureModel createFunctionalArchitectureModel() {
115 FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl();
116 return functionalArchitectureModel;
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 public Function createFunction() {
125 FunctionImpl function = new FunctionImpl();
126 return function;
127 }
128
129 /**
130 * <!-- begin-user-doc -->
131 * <!-- end-user-doc -->
132 * @generated
133 */
134 public FAMTerminator createFAMTerminator() {
135 FAMTerminatorImpl famTerminator = new FAMTerminatorImpl();
136 return famTerminator;
137 }
138
139 /**
140 * <!-- begin-user-doc -->
141 * <!-- end-user-doc -->
142 * @generated
143 */
144 public InformationLink createInformationLink() {
145 InformationLinkImpl informationLink = new InformationLinkImpl();
146 return informationLink;
147 }
148
149 /**
150 * <!-- begin-user-doc -->
151 * <!-- end-user-doc -->
152 * @generated
153 */
154 public FunctionalInterface createFunctionalInterface() {
155 FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl();
156 return functionalInterface;
157 }
158
159 /**
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
162 * @generated
163 */
164 public FunctionalInput createFunctionalInput() {
165 FunctionalInputImpl functionalInput = new FunctionalInputImpl();
166 return functionalInput;
167 }
168
169 /**
170 * <!-- begin-user-doc -->
171 * <!-- end-user-doc -->
172 * @generated
173 */
174 public FunctionalOutput createFunctionalOutput() {
175 FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl();
176 return functionalOutput;
177 }
178
179 /**
180 * <!-- begin-user-doc -->
181 * <!-- end-user-doc -->
182 * @generated
183 */
184 public FunctionType createFunctionTypeFromString(EDataType eDataType, String initialValue) {
185 FunctionType result = FunctionType.get(initialValue);
186 if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
187 return result;
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 public String convertFunctionTypeToString(EDataType eDataType, Object instanceValue) {
196 return instanceValue == null ? null : instanceValue.toString();
197 }
198
199 /**
200 * <!-- begin-user-doc -->
201 * <!-- end-user-doc -->
202 * @generated
203 */
204 public famPackage getfamPackage() {
205 return (famPackage)getEPackage();
206 }
207
208 /**
209 * <!-- begin-user-doc -->
210 * <!-- end-user-doc -->
211 * @deprecated
212 * @generated
213 */
214 @Deprecated
215 public static famPackage getPackage() {
216 return famPackage.eINSTANCE;
217 }
218
219} //famFactoryImpl