1 /*******************************************************************************
2 * Copyright (c) 2011, 2014 Obeo.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Obeo - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.impl
;
13 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.*;
14 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.ACliche
;
15 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.UML2CompareTestProfileFactory
;
16 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.UML2CompareTestProfilePackage
;
17 import org
.eclipse
.emf
.ecore
.EClass
;
18 import org
.eclipse
.emf
.ecore
.EObject
;
19 import org
.eclipse
.emf
.ecore
.EPackage
;
20 import org
.eclipse
.emf
.ecore
.impl
.EFactoryImpl
;
21 import org
.eclipse
.emf
.ecore
.plugin
.EcorePlugin
;
24 * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
28 public class UML2CompareTestProfileFactoryImpl
extends EFactoryImpl
implements UML2CompareTestProfileFactory
{
30 * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
34 public static UML2CompareTestProfileFactory
init() {
36 UML2CompareTestProfileFactory theUML2CompareTestProfileFactory
= (UML2CompareTestProfileFactory
)EPackage
.Registry
.INSTANCE
37 .getEFactory(UML2CompareTestProfilePackage
.eNS_URI
);
38 if (theUML2CompareTestProfileFactory
!= null) {
39 return theUML2CompareTestProfileFactory
;
41 } catch (Exception exception
) {
42 EcorePlugin
.INSTANCE
.log(exception
);
44 return new UML2CompareTestProfileFactoryImpl();
48 * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
52 public UML2CompareTestProfileFactoryImpl() {
57 * <!-- begin-user-doc --> <!-- end-user-doc -->
62 public EObject
create(EClass eClass
) {
63 switch (eClass
.getClassifierID()) {
64 case UML2CompareTestProfilePackage
.ACLICHE
:
65 return createACliche();
66 case UML2CompareTestProfilePackage
.ACLICHE2
:
67 return createACliche2();
68 case UML2CompareTestProfilePackage
.ACLICHE3
:
69 return createACliche3();
71 throw new IllegalArgumentException(
72 "The class '" + eClass
.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
77 * <!-- begin-user-doc --> <!-- end-user-doc -->
81 public ACliche
createACliche() {
82 AClicheImpl aCliche
= new AClicheImpl();
87 * <!-- begin-user-doc --> <!-- end-user-doc -->
91 public ACliche2
createACliche2() {
92 ACliche2Impl aCliche2
= new ACliche2Impl();
97 * <!-- begin-user-doc --> <!-- end-user-doc -->
101 public ACliche3
createACliche3() {
102 ACliche3Impl aCliche3
= new ACliche3Impl();
107 * <!-- begin-user-doc --> <!-- end-user-doc -->
111 public UML2CompareTestProfilePackage
getUML2CompareTestProfilePackage() {
112 return (UML2CompareTestProfilePackage
)getEPackage();
116 * <!-- begin-user-doc --> <!-- end-user-doc -->
122 public static UML2CompareTestProfilePackage
getPackage() {
123 return UML2CompareTestProfilePackage
.eINSTANCE
;
126 } // UML2CompareTestProfileFactoryImpl