/** */ package org.xtext.xrobot.dsl.xRobotDSL.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.xtext.xrobot.dsl.xRobotDSL.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class XRobotDSLFactoryImpl extends EFactoryImpl implements XRobotDSLFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static XRobotDSLFactory init() { try { XRobotDSLFactory theXRobotDSLFactory = (XRobotDSLFactory)EPackage.Registry.INSTANCE.getEFactory(XRobotDSLPackage.eNS_URI); if (theXRobotDSLFactory != null) { return theXRobotDSLFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new XRobotDSLFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public XRobotDSLFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case XRobotDSLPackage.PROGRAM: return createProgram(); case XRobotDSLPackage.MODE: return createMode(); case XRobotDSLPackage.FUNCTION: return createFunction(); case XRobotDSLPackage.VARIABLE: return createVariable(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Program createProgram() { ProgramImpl program = new ProgramImpl(); return program; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Mode createMode() { ModeImpl mode = new ModeImpl(); return mode; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Function createFunction() { FunctionImpl function = new FunctionImpl(); return function; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Variable createVariable() { VariableImpl variable = new VariableImpl(); return variable; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public XRobotDSLPackage getXRobotDSLPackage() { return (XRobotDSLPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static XRobotDSLPackage getPackage() { return XRobotDSLPackage.eINSTANCE; } } //XRobotDSLFactoryImpl