/**
*/
package flatfsm.fsm.impl;
import flatfsm.fsm.*;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class FsmFactoryImpl extends EFactoryImpl implements FsmFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static FsmFactory init() {
try {
FsmFactory theFsmFactory = (FsmFactory)EPackage.Registry.INSTANCE.getEFactory(FsmPackage.eNS_URI);
if (theFsmFactory != null) {
return theFsmFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new FsmFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FsmFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case FsmPackage.NAMED_ELEMENT: return createNamedElement();
case FsmPackage.STATE_MACHINE: return createStateMachine();
case FsmPackage.STATE: return createState();
case FsmPackage.FINAL_STATE: return createFinalState();
case FsmPackage.INITIAL_STATE: return createInitialState();
case FsmPackage.TRANSITION: return createTransition();
case FsmPackage.TIMED_TRANSITION: return createTimedTransition();
case FsmPackage.TRIGGER: return createTrigger();
case FsmPackage.PSEUDOSTATE: return createPseudostate();
case FsmPackage.FORK: return createFork();
case FsmPackage.JOIN: return createJoin();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NamedElement createNamedElement() {
NamedElementImpl namedElement = new NamedElementImpl();
return namedElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StateMachine createStateMachine() {
StateMachineImpl stateMachine = new StateMachineImpl();
return stateMachine;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public State createState() {
StateImpl state = new StateImpl();
return state;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FinalState createFinalState() {
FinalStateImpl finalState = new FinalStateImpl();
return finalState;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InitialState createInitialState() {
InitialStateImpl initialState = new InitialStateImpl();
return initialState;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Transition createTransition() {
TransitionImpl transition = new TransitionImpl();
return transition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TimedTransition createTimedTransition() {
TimedTransitionImpl timedTransition = new TimedTransitionImpl();
return timedTransition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Trigger createTrigger() {
TriggerImpl trigger = new TriggerImpl();
return trigger;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Pseudostate createPseudostate() {
PseudostateImpl pseudostate = new PseudostateImpl();
return pseudostate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Fork createFork() {
ForkImpl fork = new ForkImpl();
return fork;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Join createJoin() {
JoinImpl join = new JoinImpl();
return join;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FsmPackage getFsmPackage() {
return (FsmPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static FsmPackage getPackage() {
return FsmPackage.eINSTANCE;
}
} //FsmFactoryImpl