SmachDSLFactoryImpl.java
Go to the documentation of this file.
00001 
00003 package org.best.of.robotics.smachDSL.impl;
00004 
00005 import org.best.of.robotics.smachDSL.*;
00006 
00007 import org.eclipse.emf.ecore.EClass;
00008 import org.eclipse.emf.ecore.EObject;
00009 import org.eclipse.emf.ecore.EPackage;
00010 
00011 import org.eclipse.emf.ecore.impl.EFactoryImpl;
00012 
00013 import org.eclipse.emf.ecore.plugin.EcorePlugin;
00014 
00021 public class SmachDSLFactoryImpl extends EFactoryImpl implements SmachDSLFactory
00022 {
00029   public static SmachDSLFactory init()
00030   {
00031     try
00032     {
00033       SmachDSLFactory theSmachDSLFactory = (SmachDSLFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.best.org/of/robotics/SmachDSL"); 
00034       if (theSmachDSLFactory != null)
00035       {
00036         return theSmachDSLFactory;
00037       }
00038     }
00039     catch (Exception exception)
00040     {
00041       EcorePlugin.INSTANCE.log(exception);
00042     }
00043     return new SmachDSLFactoryImpl();
00044   }
00045 
00052   public SmachDSLFactoryImpl()
00053   {
00054     super();
00055   }
00056 
00062   @Override
00063   public EObject create(EClass eClass)
00064   {
00065     switch (eClass.getClassifierID())
00066     {
00067       case SmachDSLPackage.PRIMITIVE_PACKAGE: return createPrimitivePackage();
00068       case SmachDSLPackage.TEST: return createTest();
00069       case SmachDSLPackage.STATE_MACHINE: return createStateMachine();
00070       case SmachDSLPackage.ACTION_CLIENT: return createActionClient();
00071       case SmachDSLPackage.SERVICE_CLIENT: return createServiceClient();
00072       case SmachDSLPackage.ACTION_STATE: return createActionState();
00073       case SmachDSLPackage.TRANSITION: return createTransition();
00074       default:
00075         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
00076     }
00077   }
00078 
00084   public PrimitivePackage createPrimitivePackage()
00085   {
00086     PrimitivePackageImpl primitivePackage = new PrimitivePackageImpl();
00087     return primitivePackage;
00088   }
00089 
00095   public Test createTest()
00096   {
00097     TestImpl test = new TestImpl();
00098     return test;
00099   }
00100 
00106   public StateMachine createStateMachine()
00107   {
00108     StateMachineImpl stateMachine = new StateMachineImpl();
00109     return stateMachine;
00110   }
00111 
00117   public ActionClient createActionClient()
00118   {
00119     ActionClientImpl actionClient = new ActionClientImpl();
00120     return actionClient;
00121   }
00122 
00128   public ServiceClient createServiceClient()
00129   {
00130     ServiceClientImpl serviceClient = new ServiceClientImpl();
00131     return serviceClient;
00132   }
00133 
00139   public ActionState createActionState()
00140   {
00141     ActionStateImpl actionState = new ActionStateImpl();
00142     return actionState;
00143   }
00144 
00150   public Transition createTransition()
00151   {
00152     TransitionImpl transition = new TransitionImpl();
00153     return transition;
00154   }
00155 
00161   public SmachDSLPackage getSmachDSLPackage()
00162   {
00163     return (SmachDSLPackage)getEPackage();
00164   }
00165 
00172   @Deprecated
00173   public static SmachDSLPackage getPackage()
00174   {
00175     return SmachDSLPackage.eINSTANCE;
00176   }
00177 
00178 } //SmachDSLFactoryImpl


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Sun Oct 5 2014 22:38:34