/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.papyrus.infra.constraints.environment.impl; 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; import org.eclipse.papyrus.infra.constraints.environment.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class EnvironmentFactoryImpl extends EFactoryImpl implements EnvironmentFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static EnvironmentFactory init() { try { EnvironmentFactory theEnvironmentFactory = (EnvironmentFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/constraints/environment/0.9"); if (theEnvironmentFactory != null) { return theEnvironmentFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new EnvironmentFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EnvironmentFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case EnvironmentPackage.CONSTRAINT_ENVIRONMENT: return createConstraintEnvironment(); case EnvironmentPackage.CONSTRAINT_TYPE: return createConstraintType(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ConstraintEnvironment createConstraintEnvironment() { ConstraintEnvironmentImpl constraintEnvironment = new ConstraintEnvironmentImpl(); return constraintEnvironment; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ConstraintType createConstraintType() { ConstraintTypeImpl constraintType = new ConstraintTypeImpl(); return constraintType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EnvironmentPackage getEnvironmentPackage() { return (EnvironmentPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static EnvironmentPackage getPackage() { return EnvironmentPackage.eINSTANCE; } } //EnvironmentFactoryImpl