/** | |
* Copyright (c) 2016 CEA LIST. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.ecore.sew.impl; | |
import org.eclipse.efm.ecore.sew.*; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.EObject; | |
import org.eclipse.emf.ecore.EPackage; | |
import org.eclipse.emf.ecore.impl.EFactoryImpl; | |
import org.eclipse.emf.ecore.plugin.EcorePlugin; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Factory</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class SewFactoryImpl extends EFactoryImpl implements SewFactory { | |
/** | |
* Creates the default factory implementation. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static SewFactory init() { | |
try { | |
SewFactory theSewFactory = (SewFactory)EPackage.Registry.INSTANCE.getEFactory(SewPackage.eNS_URI); | |
if (theSewFactory != null) { | |
return theSewFactory; | |
} | |
} | |
catch (Exception exception) { | |
EcorePlugin.INSTANCE.log(exception); | |
} | |
return new SewFactoryImpl(); | |
} | |
/** | |
* Creates an instance of the factory. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public SewFactoryImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EObject create(EClass eClass) { | |
switch (eClass.getClassifierID()) { | |
case SewPackage.WNAMED_ELEMENT: return createWNamedElement(); | |
case SewPackage.SE_WORKFLOW: return createSEWorkflow(); | |
case SewPackage.WOBJECT: return createWObject(); | |
case SewPackage.WSECTION: return createWSection(); | |
case SewPackage.WATTRIBUTE: return createWAttribute(); | |
default: | |
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public WNamedElement createWNamedElement() { | |
WNamedElementImpl wNamedElement = new WNamedElementImpl(); | |
return wNamedElement; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public SEWorkflow createSEWorkflow() { | |
SEWorkflowImpl seWorkflow = new SEWorkflowImpl(); | |
return seWorkflow; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public WObject createWObject() { | |
WObjectImpl wObject = new WObjectImpl(); | |
return wObject; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public WSection createWSection() { | |
WSectionImpl wSection = new WSectionImpl(); | |
return wSection; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public WAttribute createWAttribute() { | |
WAttributeImpl wAttribute = new WAttributeImpl(); | |
return wAttribute; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public SewPackage getSewPackage() { | |
return (SewPackage)getEPackage(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @deprecated | |
* @generated | |
*/ | |
@Deprecated | |
public static SewPackage getPackage() { | |
return SewPackage.eINSTANCE; | |
} | |
} //SewFactoryImpl |