/** | |
* <copyright> | |
* </copyright> | |
* | |
* $Id$ | |
*/ | |
package statemachine.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 statemachine.*; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Factory</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class StatemachineFactoryImpl extends EFactoryImpl implements StatemachineFactory { | |
/** | |
* Creates the default factory implementation. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static StatemachineFactory init() { | |
try { | |
StatemachineFactory theStatemachineFactory = (StatemachineFactory)EPackage.Registry.INSTANCE.getEFactory("http://statemachine/r1"); | |
if (theStatemachineFactory != null) { | |
return theStatemachineFactory; | |
} | |
} | |
catch (Exception exception) { | |
EcorePlugin.INSTANCE.log(exception); | |
} | |
return new StatemachineFactoryImpl(); | |
} | |
/** | |
* Creates an instance of the factory. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public StatemachineFactoryImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EObject create(EClass eClass) { | |
switch (eClass.getClassifierID()) { | |
case StatemachinePackage.STATE: return createState(); | |
case StatemachinePackage.TRANSITION: return createTransition(); | |
case StatemachinePackage.COMPOSITE_STATE: return createCompositeState(); | |
case StatemachinePackage.REGION: return createRegion(); | |
default: | |
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public State createState() { | |
StateImpl state = new StateImpl(); | |
return state; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Transition createTransition() { | |
TransitionImpl transition = new TransitionImpl(); | |
return transition; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public CompositeState createCompositeState() { | |
CompositeStateImpl compositeState = new CompositeStateImpl(); | |
return compositeState; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Region createRegion() { | |
RegionImpl region = new RegionImpl(); | |
return region; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public StatemachinePackage getStatemachinePackage() { | |
return (StatemachinePackage)getEPackage(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @deprecated | |
* @generated | |
*/ | |
public static StatemachinePackage getPackage() { | |
return StatemachinePackage.eINSTANCE; | |
} | |
} //StatemachineFactoryImpl |