/** * <copyright> * </copyright> * * $Id$ */ package statechart.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 statechart.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class StatechartFactoryImpl extends EFactoryImpl implements StatechartFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static StatechartFactory init() { try { StatechartFactory theStatechartFactory = (StatechartFactory)EPackage.Registry.INSTANCE.getEFactory("http://statechart/1.0"); if (theStatechartFactory != null) { return theStatechartFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new StatechartFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StatechartFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case StatechartPackage.MODEL: return createModel(); case StatechartPackage.NODE: return createNode(); case StatechartPackage.TRANSITION: return createTransition(); case StatechartPackage.VARIABLE: return createVariable(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Model createModel() { ModelImpl model = new ModelImpl(); return model; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Node createNode() { NodeImpl node = new NodeImpl(); return node; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Transition createTransition() { TransitionImpl transition = new TransitionImpl(); return transition; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Variable createVariable() { VariableImpl variable = new VariableImpl(); return variable; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StatechartPackage getStatechartPackage() { return (StatechartPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static StatechartPackage getPackage() { return StatechartPackage.eINSTANCE; } } //StatechartFactoryImpl